02.01.2015, 11:46
I'm not sure what is wrong, there seems to be nothing wrong with it and it looks fine. Because, the error is on the top of the callback (OnPlayerTakeDamage), it could mean there is something wrong with the script a few lines above it.
I have the same script in my GameMode, and it seems to be running perfectly fine with no errors. This is what I've got:
And, I don't think you really need the armour set to 0 because when someone's health is set to 0 their armour automatically is set to 0 aswell. That's what I think
EDIT: I have tested your script out in my GameMode, and it comes up with no errors. As I've mentioned before, there could be a problem with the script a few lines above this callback. Would you mind posting what's above it?
I have the same script in my GameMode, and it seems to be running perfectly fine with no errors. This is what I've got:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
}
return 1;
}
EDIT: I have tested your script out in my GameMode, and it comes up with no errors. As I've mentioned before, there could be a problem with the script a few lines above this callback. Would you mind posting what's above it?

