Team elimination. - 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: Team elimination. (
/showthread.php?tid=445151)
Team elimination. -
iHaze. - 20.06.2013
Hello, I've saw a few servers having a feature which is called Team elimination or whatever, It means when the whole team is killed the other team wins, Either if 2 players went into a checkpoint, Their team wins.
I know how to make the checkpoint, But i don't know how to make the team elimination.
Re: Team elimination. -
SilverKiller - 20.06.2013
Use Foreach, then make a variable Called new Dead[MAX_PLAYERS]; and then when a team member die make this (OnPlayerDeath):
Then loop through all the team players :
and check if they are dead like this:
pawn Код:
if(Dead[i] == 10) // Change 10 to your max team players
{
// Your code if they are dead
}
This is just an example..
Hope i helped.