N° of registered players online
#1

Hello guys,i've this function that i use in my registration system:

pawn Код:
if(!dini_Exists(udb_encode(playername)))
        {
(The account is registered).

And i need to show how many registered players are online,like:

There are XX registered players online.

Thanks!!
Reply
#2

Noone?
Reply
#3

Loop through all players, and check if their file exists.
Reply
#4

PHP код:
new playerscount 0;
for(new 
0MAX_PLAYERSi++)
{
if(!
IsPlayerConnected(playerid)) continue;
new 
name[MAX_PLAYER_NAME]; GetPlayerName(playeridname24);
if(!
dini_Exists(udb_encode(playername))) continue;
playerscount++;

Reply
#5

Thanks,it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)