Thread: Advanced ::players command

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Advanced ::players command 
    Registered Member Arsenic's Avatar
    Join Date
    Nov 2013
    Age
    25
    Posts
    297
    Thanks given
    16
    Thanks received
    6
    Rep Power
    9
    What do I put on the "if (******** == 1) {" line to make it say if there is only 1 player on do this?

    Code:
    if (playerCommand.equalsIgnoreCase("players") && c.playerRights > 0) {
    	if (******** == 1) {
    		c.getDH().sendStatement("There is currently " + PlayerHandler.getPlayerCount() + " person playing "+ Config.SERVER_NAME +" ");
    	} else {
    		c.getDH().sendStatement("There is currently " + PlayerHandler.getPlayerCount() + " players playing "+ Config.SERVER_NAME +" ");
    	}
    }
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Aug 2007
    Posts
    4,130
    Thanks given
    0
    Thanks received
    64
    Rep Power
    0
    Code:
    if (playerCommand.equalsIgnoreCase("players") && c.playerName.equalsIgnoreCase("Arsenic")) {
    	if (******** == 1) {
    		c.getPA().sendStatement("There is currently " + PlayerHandler.getPlayerCount() + " person playing "+ Config.SERVER_NAME +" ");
    	} else {
    		c.getPA().sendStatement("There is currently " + PlayerHandler.getPlayerCount() + " players playing "+ Config.SERVER_NAME +" ");
    	}
    }
    Reply With Quote  
     

  3. #3  
    Registered Member Arsenic's Avatar
    Join Date
    Nov 2013
    Age
    25
    Posts
    297
    Thanks given
    16
    Thanks received
    6
    Rep Power
    9
    Lmfao really?
    Reply With Quote  
     

  4. #4  
    HTML5, jQuery & CSS3 Master
    Jaiden Watling's Avatar
    Join Date
    Nov 2010
    Age
    29
    Posts
    888
    Thanks given
    305
    Thanks received
    92
    Rep Power
    0
    Lmfao, what part of this is advanced?

    here, have my :layers command.. you'll have to change a few things.

    Code:
    if (playerCommand.equalsIgnoreCase("players")) {
            c.clearNewQuestInterface();
            if (PlayerHandler.getPlayerCount() == 1){
            c.sendMessage("You are alone in the world.");
            } else{
                    c.sendMessage("There are currently "+PlayerHandler.getPlayerCount()+ " players online.");
            }
                                    c.getPA().sendFrame126(Config.SERVER_NAME+" - Online Players: " + PlayerHandler.getPlayerCount()+"", 41003);
                    //c.getPA().sendFrame126("@whi@Online players(" + PlayerHandler.getPlayerCount()+ "):", 41009);
                    int line = 41009;
                    for (int i = 1; i < Config.MAX_PLAYERS; i++) {
                        Client p = c.getClient(i);
                        if (!c.validClient(i))
                            continue;
                        if (p.playerName != null) {
                            String title = "";
                            if (p.playerRights == 1) {
                            title = "@gre@Donator@whi@,@whi@ ";
                            }else if (p.playerRights == 2) {
                            title = "@red@Respected@whi@,@whi@ ";
                            }else if (p.playerRights == 3) {
                            title = "@xxx@Legendary@whi@,@whi@ ";
                            }else if (p.playerRights == 4) {
                            title = "@blu@Support@whi@,@whi@ ";
                            }else if (p.playerRights == 5 || p.playerRights ==6 || p.playerRights == 7) {
                            title = "@mag@Mod@whi@,@whi@ ";
                            } else if (p.playerRights == 8 || p.playerRights == 9 ||  p.playerRights == 10 ) {
                            title = "@yel@Admin@whi@,@whi@ ";
                            } else if (p.playerRights == 11) {
                            title = "@yel@Head of Staff@whi@,@whi@ ";
                            } else if (p.playerRights == 12) {
                            title = "@dre@Owner@whi@, ";
                            } /* else if (p.playerRights == 11); {
                            title = "@dre@Head of Staff@whi@, ";
                            } */
                            
                            title += "level-" + p.combatLevel;
                            String extra = "";
                            if (p.exprate == 1) {
                                extra = "[ @gre@ROOKIE @whi@] ";
                            } else if (p.exprate == 2){
                                extra = "[ @yel@AVERAGE @whi@] ";
                            } else if (p.exprate == 3){
                                extra = "[@red@ LEGEND @whi@ ] ";
                            }
                            c.getPA().sendFrame126("@whi@" + extra + p.playerName + "@gre@ [@whi@"+ title + "@gre@]", line);
                            line++;
                        }
                    }
                    c.getPA().showInterface(41000);
                    c.flushOutStream();
                }

    Reply With Quote  
     

  5. #5  
    Registered Member Arsenic's Avatar
    Join Date
    Nov 2013
    Age
    25
    Posts
    297
    Thanks given
    16
    Thanks received
    6
    Rep Power
    9
    I just called it that because most commands just say the 5th line
    Reply With Quote  
     

  6. #6  
    Banned

    Join Date
    Aug 2007
    Posts
    4,130
    Thanks given
    0
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by Arsenic View Post
    I just called it that because most commands just say the 5th line
    what do you exactly mean? i honestly don't get it..
    Reply With Quote  
     

  7. #7  
    Registered Member Arsenic's Avatar
    Join Date
    Nov 2013
    Age
    25
    Posts
    297
    Thanks given
    16
    Thanks received
    6
    Rep Power
    9
    Screw it let's just call it better :: players command

    OT: Does anyone have the acutal fix?
    Reply With Quote  
     

  8. #8  
    Banned

    Join Date
    Aug 2007
    Posts
    4,130
    Thanks given
    0
    Thanks received
    64
    Rep Power
    0
    Quote Originally Posted by Arsenic View Post
    Screw it let's just call it better :: players command

    OT: Does anyone have the acutal fix?
    Code:
    f (playerCommand.equalsIgnoreCase("players")) {
    			c.sendMessage("There are currently "
    					+ PlayerHandler.getPlayerCount() + " players online.");
    		}
    Reply With Quote  
     

  9. #9  
    Registered Member Arsenic's Avatar
    Join Date
    Nov 2013
    Age
    25
    Posts
    297
    Thanks given
    16
    Thanks received
    6
    Rep Power
    9
    Quote Originally Posted by word View Post
    Code:
    f (playerCommand.equalsIgnoreCase("players")) {
    			c.sendMessage("There are currently "
    					+ PlayerHandler.getPlayerCount() + " players online.");
    		}
    *facepalm*
    What is the if statement for seeing how many people are online?
    Reply With Quote  
     

  10. #10  
    Registered Member
    Ariene's Avatar
    Join Date
    Jul 2013
    Age
    26
    Posts
    1,283
    Thanks given
    573
    Thanks received
    257
    Rep Power
    227
    Quote Originally Posted by Arsenic View Post
    *facepalm*
    What is the if statement for seeing how many people are online?
    lol you know their's a actual facepalm image right?
    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

Similar Threads

  1. ::players command in 525
    By Seth1 in forum Tutorials
    Replies: 13
    Last Post: 03-23-2009, 10:26 PM
  2. [508] Player command with player list
    By Martin in forum Tutorials
    Replies: 13
    Last Post: 03-04-2009, 03:48 AM
  3. ::players command that you see all player names
    By pkownage135 in forum Requests
    Replies: 3
    Last Post: 02-14-2009, 07:47 PM
  4. ::players Command
    By cerda in forum Requests
    Replies: 4
    Last Post: 10-13-2008, 01:38 AM
  5. [TUT] Advanced 'Players online' V1
    By thoompie in forum Tutorials
    Replies: 12
    Last Post: 06-12-2008, 11:20 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •