An error headshot system
#3

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:

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
    {
        SetPlayerHealth(playerid, 0.0);
    }
    return 1;
}
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?
Reply


Messages In This Thread
An error headshot system - by Rabea - 02.01.2015, 11:33
Re: An error headshot system - by ATGOggy - 02.01.2015, 11:39
Re: An error headshot system - by FunnyBear - 02.01.2015, 11:46
Re: An error headshot system - by Sawalha - 02.01.2015, 11:52
Re: An error headshot system - by FunnyBear - 02.01.2015, 11:57
Re: An error headshot system - by Rabea - 02.01.2015, 12:02
Re: An error headshot system - by FunnyBear - 02.01.2015, 12:10

Forum Jump:


Users browsing this thread: 1 Guest(s)