Counting Players Problem
#9

pawn Код:
new TotalPlayers = 0;

public OnPlayerConnect(playerid)
{
    TotalPlayers ++;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    TotalPlayer --;
    return 1;
}

//somewhere in cmd or...
format(string, sizeof(string), "Total players connected: %d", TotalPlayers);
if(TotalPlayers > 0) return SendClientMessage(playerid, -1, "There are no players online!");
else SendClientMessage(playerid, -1, string);
Reply


Messages In This Thread
Counting Players Problem - by GAMER_PS2 - 28.11.2011, 08:23
Re: Counting Players Problem - by System64 - 28.11.2011, 08:31
Re: Counting Players Problem - by [MWR]Blood - 28.11.2011, 08:34
Re: Counting Players Problem - by Michael@Belgium - 28.11.2011, 08:37
Re: Counting Players Problem - by System64 - 28.11.2011, 08:40
Re: Counting Players Problem - by Michael@Belgium - 28.11.2011, 08:44
Re: Counting Players Problem - by GAMER_PS2 - 28.11.2011, 08:48
Re: Counting Players Problem - by [L3th4l] - 28.11.2011, 08:54
Re: Counting Players Problem - by System64 - 28.11.2011, 09:01
Re: Counting Players Problem - by Sinc - 28.11.2011, 09:38

Forum Jump:


Users browsing this thread: 4 Guest(s)