Jump to content

Take ammo


kamyrdol32

Recommended Posts

Posted

Hello, i have problem with my script. I want take player ammo in clip but i dont know how. I can get ammo "getPedAmmoInClip" but i can't set that. Whos can help me with that?

Posted

Okej, that work but why when i have 1 ammo in clip and i shoot resource set 1 ammo in clip? When i have 2-maxinclip is good.

 

function TakeAmmo( plr, ID, ILOSC )
 local TotalAmmo = getPedTotalAmmo( plr )
 local Ammo = getPedAmmoInClip( plr )
 setWeaponAmmo(plr, ID, TotalAmmo - 1, Ammo - 1)
end

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...