29.12.2014, 23:38
OnPlayerKnifePlayer is called before the damage is called; so I imagine by doing something like this, the worst it would do is cause the slide bug.
I will look into being able to return 0 or something to stop the stab.
pawn Код:
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;
}

