Disabling some weapon damages?
#4

When you're in OnPlayerTakeDamage life packets have not yet arrived to the server.

So you can get player health and armour and restore it.

Код:
public OnPlayerTakeDamage(playerid,issuerid,Float:amount,weaponid)
{
    if(EnableDamage[weaponid] == false)
    {
        new Float:h, Float:a;
        GetPlayerHealth (playerid, h);
        GetPlayerArmour (playerid, a);

        SetPlayerHealth (playerid, h);
        SetPlayerArmour (playerid, a);

        return 1; // stop it, he dont have the hit really
    }
    return 1;
}
Reply


Messages In This Thread
Disabling some weapon damages? - by arakuta - 26.07.2013, 22:04
Re: Disabling some weapon damages? - by iggy1 - 27.07.2013, 07:53
Re: Disabling some weapon damages? - by NotIntegrated - 27.07.2013, 08:17
Re: Disabling some weapon damages? - by ReVo_ - 27.07.2013, 10:37
Re: Disabling some weapon damages? - by JimmyCh - 27.07.2013, 10:46

Forum Jump:


Users browsing this thread: 3 Guest(s)