kamyrdol32 Posted April 26, 2017 Share Posted April 26, 2017 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? Link to comment
NeXuS™ Posted April 26, 2017 Share Posted April 26, 2017 Quote bool setWeaponAmmo ( player thePlayer, int weapon, int totalAmmo, [int ammoInClip = 0] ) setWeaponAmmo Link to comment
kamyrdol32 Posted April 26, 2017 Author Share Posted April 26, 2017 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 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now