Help me with anti team kill
#1

Hello, I'm trying to use a anti team kill script on my server. It's not working. It crashed and slow the server and i can't do nothing. What script i must use for anti team kill.

P.S i have edited the timer to 100 but it didn't worked. Also don't say me to use a anti team kill that kills the team killer.
pawn Код:
// top of your gamemode
forward SettingPlayerTeam();
//OnPlayerConnect
SetTimerEx("SettingPlayerTeam",10,1,"d",playerid); // I used 100 but it still crash the server.
//Bottom of your script
public SettingPlayerTeam()
{
  for(new playerid; playerid < 200; playerid++)
    SetPlayerTeam(playerid, gTeam[playerid]);
  return 1;
}
Reply
#2

Just do:
pawn Код:
public OnPlayerUpdate(playerid)//this is called when the player does anything, so about 10-20 times a second
{
    SetPlayerTeam(playerid,gTeam[playerid]);
    return 1;
}
Although, it would probably be better to set their team when it gets changed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)