No team members - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: No team members (
/showthread.php?tid=243560)
No team members -
GNGification - 23.03.2011
Okey simple, I have a zombie mod, when all the surviors has died, how to end the round?
I think it should be something like...
if(something == 0) return EndRound
Thank you if you can help me!
Re: No team members -
alpha500delta - 23.03.2011
Well you could try
Then get your team players, and when one dies do
And when there is 0 you can do something like this
pawn Код:
if(Something == 0)
{
EndRound();
}
Re: No team members -
GNGification - 23.03.2011
but how to get my team players? + that something is just like (FILL IN)
Re: No team members -
Gamer_Z - 23.03.2011
GetPlayerTeam , SetPlayerTeam
pawn Код:
new members_survivors = 0;
for(new i; i < MAX_PLAYERS; i++)if(IsPlayerConnected(i) && GetPlayerTeam(i) == team_survivors)members_survivors++;
if(members_survivors == 0){
//no one survived
}
Re: No team members -
GNGification - 23.03.2011
It said undefined symbol team_survivors so I added new team_survivors = 0; is that correct?
Re: No team members -
Gamer_Z - 23.03.2011
#define team_survivors 1
#define team_zombie 2
#define team_... ...