Liberty Unleashed

Scripting => Script Help => Topic started by: eXe^ on December 26, 2015, 02:20:14 pm

Title: Headshot's with frindlyfire 1
Post by: eXe^ on December 26, 2015, 02:20:14 pm
Hey, I have some problem with my gamemode.
I have working headshots, and friendlifire 1 (can't kill the same team).
All is good, because i can't kill the same team, but i can kill my team shot in the head.
How to turn off this?

Code: [Select]
function onClientShot(p,w,b)
{
if (b == BODYPART_HEAD && w >= 3 && w <= 7)
{
pp.RemoveLimb(BODYPART_HEAD);
pp.Health = 1;
}
return 1;
}
Title: Re: Headshot's with frindlyfire 1
Post by: Stoku on December 27, 2015, 03:23:51 pm
Try this:
Code: [Select]
if (b == BODYPART_HEAD && w >= 3 && w <= 7 && p.Team != pp.Team )