14.04.2015, 20:27
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:
But, it's not work..
Thanks in advance.
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;
}
Thanks in advance.