weapon automatically removed with 0 ammo
#1

Hi all,
Today I have a problem with weapons and ammo.
Gta sa automatically remove all weapons with 0 ammo, but I need to hook this. So, when the player have 0 ammo in his weapon him must to stay with weapon in hand.

I've tried OnPlayerWeaponShot with this code:
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(hittype >= BULLET_HIT_TYPE_NONE)
    {
        if(GetPlayerAmmo(playerid) < 1)
            GivePlayerGun(playerid, weaponid, 1);
    }
    return 1;
}
But, it's not work..

Thanks in advance.
Reply


Messages In This Thread
weapon automatically removed with 0 ammo - by J4Rr3x - 14.04.2015, 20:27
Re: weapon automatically removed with 0 ammo - by ReD_HunTeR - 14.04.2015, 20:31
Re: weapon automatically removed with 0 ammo - by J4Rr3x - 14.04.2015, 20:47
Re: weapon automatically removed with 0 ammo - by Kar - 15.04.2015, 00:44
Re: weapon automatically removed with 0 ammo - by J4Rr3x - 15.04.2015, 13:23

Forum Jump:


Users browsing this thread: 1 Guest(s)