Ulysses
General => Developers Corner => Topic started by: Moka on October 23, 2012, 07:24:05 PM
-
I used to have URS on my server but seeing as Garry's Mod 13 is about to be released and URS has not been updated yet I was wondering if anyone knew a function to block those HL2 weapons. I cant figure out where the files are for the guns that are in the spawn menu are so I had to resort to this. I cant really do any porting as I am not the best at Lua do if any of you could possibly send me a function to block a weapon it would be greatly appreciated.
-
If you want to prevent all weapons from being used just set the regular gmod convar sbox_weapons to 0.
-
I have that set to false but people can still spawn weapons in the spawn menu. But seeing as the addon for the guns are no longer in the addons folder i am having trouble finding them to set them as admin only if possible.
-
hook.Add("PlayerGiveSWEP", "BlockWeapons", function()
return ply:IsAdmin()
end)
hook.Add("PlayerSpawnSWEP", "BlockWeapons", function()
return ply:IsAdmin()
end)
-
Cool i will try this out. Thanks!