20.11.2014, 21:36
Thanks for the clarification. How-ever, I believe it'd be an easier spoof since it's called when damage is given, which now-a-days can be spoofed easily whereas animations, etc isn't so easy.
Checking the animation can cause false negatives too. Consider this:
A = killer B = player getting knifed if A knives B, and only B sees the throat slitting animation. on A's screen he's not knifing. B dies. In this case your include would fail where with OnPlayerGiveDamage it would get picked up. I don't know if it's harder to spoof animation, though it's definitely less mainstream. Obviously you can do whatever you want, it's your include, and I hope I don't seem pushy to you to change your include. |
public OnPlayerKnifePlayer(playerid, targetid)
{
if(GetPlayerTeam(playerid) == GetPlayerTeam(targetid))
{
return GameTextForPlayer(playerid, "~r~Don't back-stab team mates!", 5000, 3);
}
return 1;
}
public OnPlayerKnifePlayer(playerid, targetid)
{
if(GetPlayerTeam(playerid) == GetPlayerTeam(targetid))
{
GameTextForPlayer(playerid, "~r~Don't back-stab team mates!", 5000, 3);
new Float: pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
ClearAnimations(playerid);
return ClearAnimations(targetid);
}
return 1;
}