Garry’s Mod Gamemode Without Weapons

garrys-modmodssource-engine

I have a kid who loves Minecraft and I think he would enjoy Garry's Mod in terms of building maps, contraptions and so on. However, I don't particularly want him being able to use weapons and 'mobs' in his creations.

Is it possible to create a gamemode that restricts the usage of certain classes of object ?

Best Answer

Maybe I found something around (and your idea is awesome, actually)

In your GMOD installation you should see a folder like this: lua/autorun/server/

Create your LUA script (noguns.lua) with a text editor and paste this in:

function StripAndGive(ply) 
    ply:StripWeapons() 
    ply:Give("weapon_physcannon") 
    ply:Give("weapon_gravgun") 
    ply:Give("gmod_toolgun") 
    return true 
end 
hook.Add("PlayerLoadout", "StripAndGive", StripAndGive) 

After you save the script, move it in the above folder. The source is this thread and it's 4 years old. So this may not be working properly (or at all) but comes with a nice scripting guide.