GamerDeMTA Posted July 19, 2013 Posted July 19, 2013 Hi, I want to do this: *A script which check if you have more than 5 GRENADES, and if you have more than 5 Grenades, it set it to only 1 grenade.
Jaysds1 Posted July 19, 2013 Posted July 19, 2013 Use: getPedWeapon -- get's the ped's weapon getPedTotalAmmo --get's the ped's weapon total ammo setWeaponAmmo --set's the ped's weapon ammo My in-game name: Jaysds1 Retired CMG Scripter World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/
GamerDeMTA Posted July 19, 2013 Author Posted July 19, 2013 but getPedWeapon is by slot and i want only 1 weapon not all of slot, isnt possible with ID?
Moderators IIYAMA Posted July 19, 2013 Moderators Posted July 19, 2013 this would do it. getPedWeapon ( ped, getSlotFromWeapon ( weaponid ) ) Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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