• Non admins can spawn sweps
    8 replies, posted
How can I prevent non-admins from from spawning weapons from the "Weapons" tab?
It depends on what Admin mod you are using.
Ulx.
Sorry to bump, still haven't figured this out though.
I'm still having the problem... No one knows?
I can only think of one way to do it which is slightly tedious. You will have to go into each custom weapon you downloaded, go into the lua folder and then the weapons folder, then it might be another folder then shared.lua and look for the lines[code] SWEP.Spawnable = true SWEP.AdminSpawnable = false[/code] and change it to [code]SWEP.Spawnable = false SWEP.AdminSpawnable = true[/code]
Or try this [code]local function BlockSweps( ply ) if (!ply:IsAdmin()) then return false end end hook.Add( "PlayerSpawnSWEP", "BlockSweps", BlockSweps ) hook.Add( "PlayerGiveSWEP", "BlockSweps", BlockSweps )[/code]
If it matters, they aren't custom sweps, they're the default/stock/whatever weapons in the Weapons tab, MP5, M16, etc... I assume the same goes there? Just need to make SWEP.Spawnable equal to false?
[QUOTE=faze;17980816]If it matters, they aren't custom sweps, they're the default/stock/whatever weapons in the Weapons tab, MP5, M16, etc... I assume the same goes there? Just need to make SWEP.Spawnable equal to false?[/QUOTE] And SWEP.AdminSpawnable to true
Sorry, you need to Log In to post a reply to this thread.