Trying to make it so if the user is entering a weapon that is banned, it will not work!
local CN= "Trainer"
local bannedSweps = { }
bannedSweps["weapon_keypadchecker"] = true
bannedSweps["arrest_stick"] = true
bannedSweps["door_ram"] = true
bannedSweps["keys"] = true
bannedSweps["pocket"] = true
bannedSweps["unarrest_stick"] = true
bannedSweps["weaponchecker"] = true
bannedSweps["weapon_nav_editor"] = true
bannedSweps["manhack_welder"] = true
bannedSweps["tbfy_manager"] = true
bannedSweps["weapon_vape_mega"] = true
function ulx.give( calling_ply, target_ply, message )
if message == (bannedSweps[""]) then
print("That weapon is banned!")
else
target_ply:Give( message )
end
ulx.fancyLogAdmin( calling_ply, true , "#A gave #T a ".. message ,target_ply)
end
local give = ulx.command( CN, "ulx give", ulx.give , "!give" , true )
give:addParam{ type=ULib.cmds.PlayerArg, target="*"}
give:addParam{ type=ULib.cmds.StringArg, hint="weapon"}
give:defaultAccess( ULib.ACCESS_ADMIN )
give:help( "Gives a certain player a weapon" )