SA-MP Forums Archive
How do i give penalty for teamkilling? - 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: How do i give penalty for teamkilling? (/showthread.php?tid=68406)



How do i give penalty for teamkilling? - Drift_04 - 10.03.2009

i want to make it so on my server if you kill your own team they get a penalty i have these teams

Код:
(gTeam[playerid] == TEAM_GROVE) and (gTeam[playerid] == TEAM_BALLA)
How do i make it so if grove kills grove they lose $5,000 and they're hp goes down to 1? thankyou!!!

IT WILL FEEL GOOD TO GET REVENGE ON THOSE WHO TEAMKILL!

~~[Drift]~~


Re: How do i give penalty for teamkilling? - StrickenKid - 10.03.2009

what i did on my server is:

pawn Код:
//on player death

if(gTeam[killerid] == gTeam[playerid]) // if the killerid`s team equals the team of the person who got killed
{
// teamkill!
giveplayermoney(killerid,-5000);
setplayerhealth(killerid,1.0);
... etc.....
}



Re: How do i give penalty for teamkilling? - Drift_04 - 10.03.2009

oohh nicest idea ever! thanks a lot man! =)