DarkByte Posted October 20, 2015 Posted October 20, 2015 Hey can someone help me make to get weapons from a table and from lower name please. function giveWeaponCommand(cmd, weapon, amount) weapon = tonumber(weapon) or getWeaponIDFromName(weapon) if not weapon then return end amount = amount and tonumber(amount) or 500 server.giveMeWeapon(math.floor(weapon), amount) end addCommandHandler('give', giveWeaponCommand) addCommandHandler('wp', giveWeaponCommand)
swedishboy Posted October 20, 2015 Posted October 20, 2015 Write /give function giveWeaponCommand(cmd, weapon, amount) weapon = tonumber(weapon) or getWeaponIDFromName(weapon) if not weapon then return end amount = amount and tonumber(amount) or 500 server.giveMeWeapon(math.floor(weapon), amount) end addCommandHandler('give', giveWeaponCommand) What you mean with ( lower name ) ?
DarkByte Posted October 20, 2015 Author Posted October 20, 2015 Man i know how to use this script. And to get weapon names from tables
Fist Posted October 22, 2015 Posted October 22, 2015 why u made other topic for it if u have already made for it? https://forum.multitheftauto.com/viewtopic.php?f=91&t=93849
jingzhi Posted November 19, 2015 Posted November 19, 2015 Hey can someone help me make to get weapons from a table and from lower name please.function giveWeaponCommand(cmd, weapon, amount) weapon = tonumber(weapon) or getWeaponIDFromName(weapon) if not weapon then return end amount = amount and tonumber(amount) or 500 server.giveMeWeapon(math.floor(weapon), amount) end addCommandHandler('give', giveWeaponCommand) addCommandHandler('wp', giveWeaponCommand) Show the giveMeWeapon function cause I dont see any operation related to tables here
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