Thread: ::players command that you see all player names

Results 1 to 4 of 4
  1. #1 ::players command that you see all player names 
    Registered Member
    Join Date
    Oct 2008
    Posts
    192
    Thanks given
    0
    Thanks received
    2
    Rep Power
    36
    can somewhone send me
    Reply With Quote  
     

  2. #2  
    Donator

    iZAjz's Avatar
    Join Date
    Mar 2007
    Age
    29
    Posts
    3,675
    Thanks given
    105
    Thanks received
    47
    Rep Power
    1882
    Code:
                    } else if (cmd[0].equals("players")) {
                        p.frames.sendMessage(p,"Players Online:<col=0000FF> "+ Engine.getPlayerCount() + ".");
           
    		   int number = 0;
    		   for (Player p5 : Engine.players) {
    		   if(p5 == null)
    		   continue;
    		   number++;
    
    		   p.frames.setString(p, "("+p5.playerId+") "+p5.username+" Combat: "+p5.combatLevel, 275, (11+number));
    					}
    		   p.frames.setString(p, "YourServerName", 275, 10);
    		   p.frames.setString(p, "Players Online: "+number, 275, 11);
    		   p.frames.showInterface(p, 275);
    		   p.frames.setString(p, "Player's Online", 275, 2);
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Jan 2008
    Posts
    2,340
    Thanks given
    20
    Thanks received
    575
    Rep Power
    1202
    What methods? You don't need any l0l.

    The right one, because you put the } @ the wrong place and didnt use conventions:

    Code:
    	if (cmd[0].startsWith("players")) {
    		int total = 0;
    		for (Player clients : Engine.players) {
    			if(clients == null) {
    				return;
    			}
                            total++;
                            p.frames.setString(p, "("+clients.playerId+")   "+clients.username, 275, (11+total));
    		}
    			p.frames.setString(p, "Players Online", 275, 2);
                        	p.frames.setString(p, "Ploxage Players Online: "+number, 275, 11);
                        	p.frames.showInterface(p, 275);
    	}
    Reply With Quote  
     

  4. #4  
    Donator

    iZAjz's Avatar
    Join Date
    Mar 2007
    Age
    29
    Posts
    3,675
    Thanks given
    105
    Thanks received
    47
    Rep Power
    1882
    Quote Originally Posted by Lil_Michael View Post
    What methods? You don't need any l0l.

    The right one, because you put the } @ the wrong place and didnt use conventions:

    Code:
    	if (cmd[0].startsWith("players")) {
    		int total = 0;
    		for (Player clients : Engine.players) {
    			if(clients == null) {
    				return;
    			}
                            total++;
                            p.frames.setString(p, "("+clients.playerId+")   "+clients.username, 275, (11+total));
    		}
    			p.frames.setString(p, "Players Online", 275, 2);
                        	p.frames.setString(p, "Ploxage Players Online: "+number, 275, 11);
                        	p.frames.showInterface(p, 275);
    	}
    Meh soz, i was just helping someone else that was asking about methods >_>

    Edited
    Reply With Quote  
     


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
  •