Object Health..?
#4

Use OnPlayerKeyStateChange and detect if the player is holding the KEY_FIRE and detect his weapon to be the chainsaw ID.
example:
pawn Код:
#define HOLDING(%0) \
    ((newkeys & (%0)) == (%0))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (HOLDING(KEY_FIRE))
    {
        if(GetPlayerWeapon(playerid) == 9)
        {
            IsPlayerInRangeOfPoint etc etc
        }
    }
    return 1;
}
Reply


Messages In This Thread
Object Health..? - by AryanV - 02.01.2014, 05:32
Re: Object Health..? - by TheOriginal1337 - 02.01.2014, 05:52
Re: Object Health..? - by AryanV - 02.01.2014, 05:55
Re: Object Health..? - by Voxel - 02.01.2014, 09:46
Re: Object Health..? - by AryanV - 02.01.2014, 13:22
Re: Object Health..? - by Schocc - 02.01.2014, 13:32
Re: Object Health..? - by Pottus - 02.01.2014, 13:52

Forum Jump:


Users browsing this thread: 2 Guest(s)