Need Anti Team Killing - 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: Need Anti Team Killing (
/showthread.php?tid=358402)
Need Anti Team Killing -
korzk7 - 10.07.2012
Found The Requesting....
Re: Need Anti Team Killing -
clarencecuzz - 10.07.2012
Do you want it to stop damage when they shoot the player, or do you want it to warn them if they kill their own team?
Re: Need Anti Team Killing -
Avi57 - 10.07.2012
add these lines to your server !
add this like below your new lines !
Код:
new gTeam[MAX_PLAYERS];
then go to on player spawn and add these lines like if you have a team called FBI Then :
Код:
gTeam[playerid] = FBI;
and if you have a team called COP then :
Код:
gTeam[playerid] = COP;
and also add this anywhere in ur script !
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(gTeam[issuerid] == gTeam[playerid])
{
GameTextForPlayer(issuerid,"Dont Kill Team Mates !",2000,4);
}
}
return 1;
}
Hope you got it !
Re: Need Anti Team Killing -
Kiets - 10.07.2012
Use SetPlayerTeam and then teammates can not kill each other.
Re: Need Anti Team Killing -
korzk7 - 11.07.2012
I Got It dude!!