Great work im guna add this to my server![]()
|
|

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
then close commands.java and compileCode: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); }
should be no errors if tehre is do the next step
Step 2:
make sure you have these imports
credits: meCode:import palidino76.rs2.Engine; import palidino76.rs2.players.Player;


nice, i tried to make one myself, but i only got the first usernane logged in
nice, but on mine it says
ritz : combat level 138
qj3
qj4
qj5
is that normal? lol

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
Thanks, I needed this.
You need to change around cause i made it for my serverCode: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); }

very nice a little better than mine but then again mine took around 30 seconds to makepublic 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);
}
(just so other people know this will not work in your server)
| « Making items equipable ~ 508 | 508 Arrow deletion. » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |