SA-MP Forums Archive
Team switch onplayerdeath - 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 switch onplayerdeath (/showthread.php?tid=298181)



Team switch onplayerdeath - Admigo - 19.11.2011

Heey all,
How can i make if a team dies the other team will be that team?
And they will respawn?

Thanks Admigo


Re: Team switch onplayerdeath - [MG]Dimi - 19.11.2011

What are you team variables?


Re: Team switch onplayerdeath - Admigo - 19.11.2011

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
What are you team variables?
if team :gTeam[playerid]=P; dies.
Team gTeam[playerid]=VP; needs to be team p.


Re: Team switch onplayerdeath - juraska - 19.11.2011

OnPlayerDeath
if( gTeam[playerid] == p)
{
gTeam[playerid]=VP
}
else if( gTeam[playerid] == VP)
{
gTeam[playerid]=p
}
That's is what you mean ?


Re: Team switch onplayerdeath - Admigo - 19.11.2011

Quote:
Originally Posted by juraska
Посмотреть сообщение
OnPlayerDeath
if( gTeam[playerid] == p)
{
gTeam[playerid]=VP
}
else if( gTeam[playerid] == VP)
{
gTeam[playerid]=p
}
That's is what you mean ?
Omg thank you,i am so stupid that i didnt noticed it.


Re: Team switch onplayerdeath - Admigo - 19.11.2011

How can i detect if player pressed f4(force)?


Respuesta: Team switch onplayerdeath - iKeN - 19.11.2011

believe that it is not possible to detect this key but you can use
pawn Код:
public OnPlayerRequestSpawn(playerid)
to prevent that it Spawn