06.10.2013, 16:51
You can use OnPlayerDisconnect and OnPlayerConnect to update your variable, and then use the timer just to show the sendclientmessage.
Much better than count players every 15 mins
Код:
new onlinePlayers = 0; public OnPlayerConnect(playerid) { onlinePlayers++; } public OnPlayerDisconnect(playerid, reason) { onlinePlayers--; } public Timer() { new str [ 30 ]; format(str, sizeof str, "Online players: %d", onlinePlayers); SendClientMessageToAll(-1, onlinePlayers); }