Need system - 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: Need system (
/showthread.php?tid=254172)
Need system -
Tonyss23 - 09.05.2011
Hi scripters i need team anti kill system someone please help me.
Re: Need system -
Skaizo - 09.05.2011
http://forum.sa-mp.com/showthread.ph...light=antikill
this?
Re: Need system -
alpha500delta - 09.05.2011
If players are on the same team (SetPlayerTeam) they cannot kill each other. If you use gTeam[playerid]; you can make it like this
pawn Код:
if(gTeam[killerid] == gTeam[playerid])
{
SendClientMessage(playerid, COLOR, "No teamkilling!");
}
Re: Need system -
Tonyss23 - 09.05.2011
This is good script?
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_FIRE)
{
if(Gang[playerid] == Gang[playerid])
{
}
}
return 1;
}
Re: Need system -
Tonyss23 - 09.05.2011
![Huh?](images/smilies/confused.gif)
?
Re: Need system -
Sasino97 - 09.05.2011
Use OnPlayerShootPlayer by Wups (
Thread)
Code:
pawn Код:
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
if(gTeam[shooter] == gTeam[target])
{
new Float:h;
GetPlayerHealth(target, h);
SetPlayerHealth(target, h+damage);
SendClientMessage(shooter, 0xFF0000FF, "Don't shoot your team mates!");
}
return 1;
}