05.11.2010, 22:02
(
Последний раз редактировалось RyDeR`; 05.11.2010 в 22:29.
)
Example:
Put this under your command which the players use to join the mission:
Put this where they leave the mission:
This at the end of the script:
Then use it for example like this:
Put this under your command which the players use to join the mission:
pawn Код:
SetPVarInt(playerid, "missionJoined", true);
pawn Код:
SetPVarInt(playerid, "missionJoined", false);
pawn Код:
stock TotalPlayersJoined()
{
new
i,
totalPlayers
;
for( ; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i) && GetPVarInt(i, "missionJoined"))
{
++totalPlayers;
}
}
return totalPlayers;
}
pawn Код:
format(string, sizeof(string), "Total players in the mission: %d", TotalPlayersJoined());