Thread: [508] Player command with player list

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1 [508] Player command with player list 
    Registered Member

    Join Date
    Sep 2007
    Age
    29
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    Difficulty: 0
    Tested Server: palis 508
    Ausumed knowledge: not to annoy me

    Step 1:
    open rs2.io.packets.commands

    and add this command under the others

    Code:
     
     else if (cmd[0].startsWith("players")) {
    					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, "Players Online: "+number, 275, 11);
    					p.frames.sendMessage(p, "There is currently "+number+" players online.");
    					p.frames.showInterface(p, 275);
    				}
    then close commands.java and compile

    should be no errors if tehre is do the next step

    Step 2:

    make sure you have these imports

    Code:
    import palidino76.rs2.Engine;
    import palidino76.rs2.players.Player;
    credits: me

    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  2. #2  
    +Jedi+
    Guest
    Great work im guna add this to my server
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Sep 2007
    Age
    29
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    thanks for commenting lol
    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  4. #4  
    Java/C++ Programmer

    Join Date
    Jun 2008
    Age
    25
    Posts
    1,378
    Thanks given
    203
    Thanks received
    387
    Rep Power
    815
    nice, i tried to make one myself, but i only got the first usernane logged in
    Reply With Quote  
     

  5. #5  
    ritz929
    Guest
    nice, but on mine it says

    ritz : combat level 138
    qj3
    qj4
    qj5

    is that normal? lol
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Sep 2007
    Age
    29
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    yeah well you neeed to clear the reset of the lines for each player it will show them online but after all the online players it will just have qj1-300 depends on how many players u have online easy enough to fix it
    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  7. #7  
    Anubis
    Guest
    Looks good, thanks!
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jan 2007
    Posts
    19
    Thanks given
    1
    Thanks received
    0
    Rep Power
    2
    Thanks, I needed this.
    Reply With Quote  
     

  9. #9  
    Fuckin PRO

    Damien's Avatar
    Join Date
    Feb 2008
    Age
    29
    Posts
    2,658
    Thanks given
    928
    Thanks received
    82
    Rep Power
    369
    Code:
    public void loadPlayersOnline(Player p) {
    		Quest.questLoader.resetJournelInterface(p);
    		line = 0;
    		for(Player online : Engine.players) {
    			if(online == null)
    				continue;
    			if(!online.online)
    				continue;
    			line++;
    			p.frames.setString(p, Capitalize.capitalize(online.username), 275, 11+line);
    			p.frames.showInterface(p, 275);
    		}
    		p.frames.setString(p, "Player's Online", 275, 2);
    	}
    You need to change around cause i made it for my server
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Sep 2007
    Age
    29
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    public void loadPlayersOnline(Player p) {
    Quest.questLoader.resetJournelInterface;
    line = 0;
    for(Player online : Engine.players) {
    if(online == null)
    continue;
    if(!online.online)
    continue;
    line++;
    p.frames.setString(p, Capitalize.capitalize(online.username), 275, 11+line);
    p.frames.showInterface(p, 275);
    }
    p.frames.setString(p, "Player's Online", 275, 2);
    }
    very nice a little better than mine but then again mine took around 30 seconds to make

    (just so other people know this will not work in your server)
    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
    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
  •