THASMOG Posted March 27, 2014 Posted March 27, 2014 So this script wont work. function weaponSwitch (weapon) if source == getLocalPlayer() then local ammoName,_ = getWeaponAmmoType2 (weapon) if getElementData(getLocalPlayer(),ammoName) > 0 then setElementData(getLocalPlayer(),ammoName,getElementData(getLocalPlayer(),ammoName)-1) end end end addEventHandler ( "onClientPlayerWeaponFire", getLocalPlayer(), weaponSwitch ) I try to fix bug in MTA DayZ. If player tops a mag from weapon and reconnects. Picks it up he has over 10000 ammo. So i need to build check that checks ammo before shooting ? Maybe "onClientWeaponSwitch"
Moderators IIYAMA Posted March 27, 2014 Moderators Posted March 27, 2014 If you bought it then you should go back to them. We don't give support to leaked scripts.
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