Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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 ?

share|improve this question
1  
I love the idea of turning creation of a game into a game. Should there be ESRB/PEGI ratings for modding tools :p –  Paystey Jan 24 '13 at 9:20
    
I don't have a Gmod install to look at right now, but you may just be able to go in and delete those items from the files, seeing as, if I recall correctly, adding items is as easy as dropping them in. –  SaintWacko Jan 24 '13 at 14:41
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
2  
It should be noted that this could be circumvented by the kid if he deletes this file from the folder. If the parent is worried about the kid interacting with guns in a game, though, I'd assume the kid isn't old enough to be this crafty. –  Dave McClelland Jan 24 '13 at 14:55
    
By reading around, it seems there's not a way to prevent by default weapons (the "adult content password" some games provide to hide gore etc) so anything the kid does could spoil the hack :) In this case, the OP needs to backup the file just in case... –  Samuele Mattiuzzo Jan 24 '13 at 15:03
    
@Dave if he can figure out how to circumvent that, I'll assume he's mature enough to handle more adult content. :) –  Alan B Jan 24 '13 at 15:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.