Counting player online?
#1

Hello!

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.
Reply
#2

Iter_Count(Player);. No need for a loop.

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

Ty, repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)