Anti Team Kill?
#1

I cant seem to make it so you cant teamkill..

(im using gTeams)

I've searched also, and found nothing.

Any help would be appreciated.
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerTeam
Reply
#3

pawn Код:
// OnPlayerSpawn
if (gTeam[playerid] == YOUR_TEAM)
{
  SetPlayerTeam(playerid, YOUR_TEAM);
}
else if (gTeam[playerid] == YOUR_TEAM_2)
{
  SetPlayerTeam(playerid, YOUR_TEAM_2);
}
Reply
#4

Seif posted this long ago in useful snippets or something like that and i use it and it works exactly like it is supposed to,your teammates bullets using gTeam does not hurt you.


Код:
// top of your gamemode
forward SettingPlayerTeam();
//OnPlayerConnect
SetTimerEx("SettingPlayerTeam",10,1,"d",playerid);
//Bottom of your script
public SettingPlayerTeam()
{
  for(new playerid; playerid < 200; playerid++)
    SetPlayerTeam(playerid, gTeam[playerid]);
  return 1;
}
Reply
#5

Thanks for all your help guys
Reply
#6

is there a anti team kill FS? im too lazy thats why
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)