check player online
#7

You can use OnPlayerDisconnect and OnPlayerConnect to update your variable, and then use the timer just to show the sendclientmessage.

Код:
new on‌linePlayers = 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); }
Much better than count players every 15 mins
Reply


Messages In This Thread
check player online - by kbalor - 06.10.2013, 15:34
Re: check player online - by Juniiro3 - 06.10.2013, 15:39
Re: check player online - by xXShadowXx - 06.10.2013, 15:42
Re: check player online - by EiresJason - 06.10.2013, 15:43
Re: check player online - by kbalor - 06.10.2013, 16:44
Re: check player online - by xXShadowXx - 06.10.2013, 16:46
Re: check player online - by ReVo_ - 06.10.2013, 16:51

Forum Jump:


Users browsing this thread: 1 Guest(s)