flowzera Posted August 6, 2021 Share Posted August 6, 2021 I wanted to make a command, and when I type this command the server will take all of the player's weapons and save, and when I type another command the weapons will be restored Link to comment
DiSaMe Posted August 6, 2021 Share Posted August 6, 2021 To bind a function to a command: addCommandHandler To retrieve the weapons: getPedWeapon To remove the weapons: takeAllWeapons To restore the weapons: giveWeapon Link to comment
Kelly003 Posted August 6, 2021 Share Posted August 6, 2021 (edited) . Edited August 6, 2021 by Kelly003 Link to comment
MYSOTO Posted August 9, 2021 Share Posted August 9, 2021 (edited) You can do this with database, I would use the GetPedWeapon, takeAllWeapons and giveWeapon functions. You could use setElementData to manipulate the mta database below I leave you an example to remove all the weapons when doing the command. ------server.lua----- function tkw ( source ) takeAllWeapons ( source ) end addCommandHandler ( "takeweapon", tkw ) Edited August 9, 2021 by KnoxScripter 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