Thread: help welcome message

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 help welcome message 
    Registered Member
    Join Date
    Apr 2010
    Posts
    92
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    hello

    ill got a problem with the welcome message

    when ill log in to my server as mod ill get

    [MOD] redbunny had logged in!!!

    but when i make my admin/owner or ill go on my name it wont give my the welcome message plz can some one help my new to java so...

    ps the text in the middel that should not be in there.


    sM("Welcome to roenscape");

    sM("plz be-sure that you read you rules by type ::rules");

    sM("forums: is updating");

    sM(" ::talk (message to everyone)");

    sM("[Last Update]: added d claws and spec!");

    if (donator == 1){
    sM("@@ you are donator type ::yell instead of ::talk!!!");

    sM("@@ you can now enter the donator portal");

    -------------------------------------------------------------------
    ===========================================
    this side is OK but the other side its fucked up?
    ===========================================
    -------------------------------------------------------------------
    ===========================================
    this side its fucked up?
    ===========================================
    --------------------------------------------------------------------



    if (playerRights == 1){
    talk("[MOD]: "+playerName+" has logged in!!!");

    if (playerRights == 2){
    talk("[ADMIN]: "+playerName+" has logged in!!!");

    if (playerRights == 3){
    talk("[CO-OWNER]: "+playerName+" has logged in!!!");

    if (playerName.equalsIgnoreCase("redbunny")) {
    sM("Owner & Coder, redbunny has logged in!!");
    }
    }
    }
    }
    }
    Reply With Quote  
     

  2. #2  
    Austin_
    Guest
    Are you compiling when you save the .java file?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Echo`'s Avatar
    Join Date
    Jan 2009
    Age
    27
    Posts
    749
    Thanks given
    51
    Thanks received
    42
    Rep Power
    429
    fail...
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Apr 2010
    Posts
    92
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    yea ill save the file than compile then ill log in and its the same as before only mod work
    Reply With Quote  
     

  5. #5  
    Austin_
    Guest
    Do you restart the server?
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Apr 2010
    Posts
    92
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    no,

    save, compile, it then relog...
    Reply With Quote  
     

  7. #7  
    Registered Member
    jordan641's Avatar
    Join Date
    Apr 2010
    Posts
    1,807
    Thanks given
    70
    Thanks received
    128
    Rep Power
    189
    Lol, do this:

    Close server (run.bat)
    Compile
    Run.bat again.

    If you don't restart the run.bat the server is still running the old unchanged one.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Apr 2010
    Posts
    92
    Thanks given
    4
    Thanks received
    0
    Rep Power
    10
    nope wont work..
    Reply With Quote  
     

  9. #9  
    Registered Member
    Hunter's Avatar
    Join Date
    Jun 2009
    Age
    33
    Posts
    857
    Thanks given
    3
    Thanks received
    23
    Rep Power
    216
    Well first off the lines of code for those if statements fail beyond belief.

    Code:
    if (playerRights == 1) {
         talk("[MOD]: "+playerName+" has logged in!!!");
    } else if (playerRights == 2) {
         talk("[ADMIN]: "+playerName+" has logged in!!!");
    } else if (playerRights == 3) {
         talk("[CO-OWNER]: "+playerName+" has logged in!!!");
    }
     
    if (playerName.equalsIgnoreCase("redbunny")) {
         sM("Owner & Coder, redbunny has logged in!!");
    }
    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    Jan 2009
    Age
    31
    Posts
    2,661
    Thanks given
    66
    Thanks received
    207
    Rep Power
    0
    try somthing like this??

    add this somewhere at the top.

    Code:
    private static final String[] YELL_STRINGS = {"[Player] ", "[Mod] " , "[Admin] " , "[CO-Owner] " , "[Owner & Coder] "};
    then in the log in add this.
    Code:
    	if(playerRights > 0)
    		talk(YELL_STRINGS[playerRights] + playerName + " has logged in!!");

    and for your "yell" command you could do

    Code:
    if(command.equals("yell"))
    	talk(YELL_STRINGS[playerRights] + playerName + ": " + command.substring(5));
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •