Total Players Online
#1

If a player connects,how i can add such a stuff that it will say like this: %s has joined the server.(Total players online: OnLinePlayersNumbers)
Reply
#2

Top
Код:
stock GetOnlinePlayers()
{
	new count,g=GetMaxPlayers();
	for(new d; d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d)) count++;
	return count;
}
connect
Код:
new On‌line = GetOnlinePlayers();
%s has joined the server.(Total players online: %d),Nick,Online);
Reply
#3

Quote:
Originally Posted by Jefff
Top
Код:
stock GetOnlinePlayers()
{
	new count,g=GetMaxPlayers();
	for(new d; d<g; d++) if(IsPlayerConnected(d) && !IsPlayerNPC(d)) count++;
	return count;
}
connect
Код:
new On‌line = GetOnlinePlayers();
%s has joined the server.(Total players online: %d),Nick,Online);
Why do you name it?
You can do:

pawn Код:
format(string, sizeof string, "%s has joined the server.(Total players online: %d),Nick, GetOnlinePlayers());
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)