SA-MP Forums Archive
Teams - 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: Teams (/showthread.php?tid=250071)



Teams - Admigo - 21.04.2011

Heey guys

I have made a tdm with anti teamkill. I made the anti teamkill with a timer:
Код:
public SettingPlayerTeam()
{
  	for(new playerid; playerid < 200; playerid++)
        SetPlayerTeam(playerid, gTeam[playerid]);
	return 1;
}
And i made a FFA but how can i delete the anti teamkill if they are in FFA. Or destroy the teams? Helps SetplayerTeam(playerid,-1);?

pls help

Thanks Admigo


Re: Teams - alpha500delta - 21.04.2011

First of all, anti teamkill should be made under OnPlayerDeath and not with a timer (Actually you're using a loop, not a timer):

pawn Код:
if(gTeam[killerid] == gTeam[playerid)
{
    You're_Stuff
}
To delete it you can do something like this:

pawn Код:
if(gTeam[killerid] == gTeam[playerid] && GetPlayerTeam(playerid) != FFA)//I dont know you're variable for that.
{
    You're_Stuff
}
I hope this is what you mean, since I didn't really understand you're question .


Re: Teams - Admigo - 21.04.2011

Lol i am beginner