Number of players in a world ?
#1

I have a Worlds server, i want to in the dialog of world near the name of the world the number of players in.
Like :
FreeRoam World Players : 28
TDM World Players : 12
Plzz Help Me and Sorry for my bad english
The server i am talking about : 176.31.103.65:10980
Reply
#2

Код:
new __pl;

for(new playerid; playerid != MAX_PLAYERS; playerid++)
{
if(IsPlayerConnected(playerid) && GetPlayerVirtualWorld(playerid) == your_world)
{
__pl++;
}
}
printf ("%d players in world %d", __pl, your_world);
Reply
#3

No, Not This !!
Enter to the server and see the dialog of worlds i want to add the number of players near each world
Reply
#4

Its only clue for your question - if you wanna make a good server you have to learn on your own. I don't give you finished code, because you will come tomorrow and again 'gave me finished code' and by this method you will learn nothing, so please try combine your code - i will help you, but you have to code by yourself.
Reply
#5

Thanks !!
Reply
#6

Consider using "foreach" instead of "for" as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)