View Full Version : Counting player online?

28/01/2015, 12:48 PM

I'm wondering how it's possible to do code that will count players online, yeah I know that samp program is couting them already in samp browser but I just have little idea how I will use that code. If I'm right I should somehow open Loop OnPlayerConnect and variable that will count players that Connect and Disconnect but I'm not sure how to do that so I'm asking for help.

Thank you for answers, tips in advance.

28/01/2015, 02:07 PM
Iter_Count(Player); (http://forum.sa-mp.com/showthread.php?t=92679). No need for a loop.

new string[128];
format(string,sizeof(string),"There are %d connected players.",Iter_Count(Player));
SendClientMessage(playerid, -1, string);

28/01/2015, 06:10 PM
Ty, repped