Spawn System. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Spawn System. (
/showthread.php?tid=428096)
Spawn System. -
faff - 04.04.2013
'Ello,
How can i check, If there are any players alive?
Players that are dead, got 'IsDead: 1''.
But.. If want to check if all players got ''IsDead: 1"..
And if they are. I want to force public round();
Re: Spawn System. -
faff - 04.04.2013
Hmm?
Re: Spawn System. -
RajatPawar - 04.04.2013
pawn Код:
stock IsPlayerDead( playerid )
{
if( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return true;
else return false;
}
new deadcount, alivecount;
for( new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected( i )
{
if( IsPlayerDead( i ) == true ) { deadcount++; continue; }
else alivecount++;
continue;
}
}