SA-MP Forums Archive
Teamkill in samp 0.3? - 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: Teamkill in samp 0.3? (/showthread.php?tid=106766)



Teamkill in samp 0.3? - Nameless303 - 05.11.2009

Is it it possible that teammates can't harm each other in samp 0.3? (Take health away)
Ps. I don't use gTeams but I use the SetPlayerTeam thing...

Thanks!


Re: Teamkill in samp 0.3? - KIDUL - 05.11.2009

iґve the same problem i tried many ways to do so ... using it in a timer,addplayerclassex,... but it finally should work somehow because servers like the partyserver still use the anti team kill


Re: Teamkill in samp 0.3? - Jose - 05.11.2009

SA-MP has bugs with GetPlayerTeam (Sometimes return an invalid team "255") and SetPlayerTeam (needs a timer to re-set the team everytime) to fix the team(anti tk) bug.

Fix: Use a timer.


OnPlayerConnect:
Код:
SetTimerEx("ChangeName",1000,1,"d",playerid);
Public:
Код:
forward ChangeName();
public ChangeName()
{
  for(new playerid; playerid < MAX_PLAYERS; playerid++)
  SetPlayerTeam(playerid, GetPlayerTeam(playerid));
  return 1;
}



Re: Teamkill in samp 0.3? - Rainmaker - 05.11.2009

Sa-mp HAD bugs wih Set/Get PlayerTeam, but not anymore !!! Wake up dude ! 0.3 is already out !

Nameless303 : Read following ..

https://sampwiki.blast.hk/wiki/GetPlayerTeam
https://sampwiki.blast.hk/wiki/SetPlayerTeam
https://sampwiki.blast.hk/wiki/SetTeamCount