Galactix Posted June 11, 2018 Share Posted June 11, 2018 (edited) Hello, I'm trying to make a script to reload weapons but I can't get it working function weaponReload() local wep = getPlayerWeapon ( localPlayer ) setWeaponClipAmmo(wep, 7) end addCommandHandler("reload", weaponReload) I tried this to reload my desert eagle but it outputs the following error : Quote Bad argument @ 'setWeaponClipAmmo' [Expected weapon at argument 1, got number '24'] I don't really see what else than the weapon ID I could use that expected weapon error Anyone knows how to fix it? EDIT: After further research it turns out there was a built-in resource in the MTA files, problem solved Edited June 11, 2018 by Galactix Link to comment
Moderators Patrick Posted June 12, 2018 Moderators Share Posted June 12, 2018 https://wiki.multitheftauto.com/wiki/ReloadPedWeapon Link to comment
_Evo_ Posted June 13, 2018 Share Posted June 13, 2018 reloading with R key is more fast than "reload" command no? Link to comment
Galactix Posted June 14, 2018 Author Share Posted June 14, 2018 Yeah I agree, but I was going to bind the command to a key at resource start, so results would’ve been the same. On 13/06/2018 at 15:57, _Evo_ said: reloading with R key is more fast than "reload" command no? Thanks, that’s pretty useful! On 12/06/2018 at 09:16, Patrick2562 said: https://wiki.multitheftauto.com/wiki/ReloadPedWeapon Link to comment
_Evo_ Posted June 20, 2018 Share Posted June 20, 2018 i have no idea what you going to do but, the default reload resource will save your time On 6/15/2018 at 02:40, Galactix said: Yeah I agree, but I was going to bind the command to a key at resource start, so results would’ve been the same. Thanks, that’s pretty useful! Link to comment
Galactix Posted June 22, 2018 Author Share Posted June 22, 2018 On 12/06/2018 at 00:34, Galactix said: EDIT: After further research it turns out there was a built-in resource in the MTA files, problem solved Which is what I did 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