Anti team kill with gteam? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Anti team kill with gteam? (
/showthread.php?tid=199121)
Anti team kill with gteam? -
Face9000 - 14.12.2010
Hi all,im coding new tdm gm,and i've 8 teams.
I need to add anti team kill.I mean,bullets have 0 damage when player shoot at his team mate.
Thanks.
Re: Anti team kill with gteam? -
veyron - 14.12.2010
i dont know anything about your gamemode (how teams are stored)
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(gteam[killerid] == gteam[playerid] && killerid != INVALID_PLAYER_ID)
{
SendClientMessage(killerid,COLOR_RED,"You killed your teammate!");
// code here , example SetPlayerHealth(killerid,0);
}
}
this topic should be in scripting discussion