Participants
#5

pawn Код:
new Event[MAX_PLAYERS];

// When a player joins the event:
Event[playerid] = 1;

// When a player leaves the event or disconnects:
Event[playerid] = 0;

// When you want to count participants and show the count to playerid:
new participants,msg[144];
for(new i=0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i) && Event[i]) participants++;
}
format(msg,sizeof(msg),"There are %i participants.",participants);
SendClientMessage(playerid,-1,msg);
Reply


Messages In This Thread
Participants - by z3r0w1zard - 12.07.2013, 23:13
Re: Participants - by z3r0w1zard - 12.07.2013, 23:23
Re: Participants - by MrCoder - 12.07.2013, 23:24
Re: Participants - by z3r0w1zard - 12.07.2013, 23:28
Respuesta: Participants - by PHudson - 13.07.2013, 00:02

Forum Jump:


Users browsing this thread: 2 Guest(s)