Hello this is my first post and I was wondering if anyone can help me; I am fairly new to GLUA and LUA in general so I was wondering if someone can help me with this.
I want to be able to disable rope_width which is built-in to gmod.
I have already tried
[CODE]concommand.Add("Rope_width")
concommand.Remove( "rope_width" )[/CODE]
also where would I go about placing this? In the addons folder or ?
Thanks
This is what I do to remove commands.
[CODE]
concommand.Add("command_name", function(ply) ply:PrintMessage(HUD_PRINTCONSOLE, "no") end)
[/CODE]Run it server-side.
[QUOTE=SexyBeast70;49099599]This is what I do.
[CODE]
concommand.Add("rope_width", function(ply) ply:PrintMessage(HUD_PRINTCONSOLE, "no") end)
[/CODE]Run it server-side.[/QUOTE]
What do you mean server sided?
Like where would I put this?
[QUOTE=Smeone;49099629]What do you mean server sided?
Like where would I put this?[/QUOTE]
In the materials folder. :v:
lol
[QUOTE=SexyBeast70;49099639]In the materials folder. :v:[/QUOTE]
?
You don't put it in the materials folder because it doesn't work like that.
If you want to run a script server side, either put it in lua/autorun with if (SERVER) then or place it in lua/autorun/server
[QUOTE=code_gs;49099700][url]http://wiki.garrysmod.com/page/concommand/Remove[/url][/QUOTE]
Yep, I got that.. But I don't know how to use it, I have put it in my lua/autrun and my addons folder.
[editline]12th November 2015[/editline]
[QUOTE=Stardust342;49099705]You don't put it in the materials folder because it doesn't work like that.
If you want to run a script server side, either put it in lua/autorun with if (SERVER) then or place it in lua/autorun/server[/QUOTE]
so..
[CODE]if (SERVER) then
concommand.Add("rope_width", function(ply) ply:PrintMessage(HUD_PRINTCONSOLE, "no") end)
end[/CODE]
in \garrysmod\lua\autorun\server
or would it be
if (SERVER) then
concommand.Add("rope_width")
concommand.Remove( "rope_width" )
Sorry, rope_width is a convar, which means you can't overwrite it. You'll have to patch ropes instead.
[QUOTE=code_gs;49099855]Sorry, rope_width is a convar, which means you can't overwrite it. You'll have to patch ropes instead.[/QUOTE]
Well I want to do this too button_model, And I have seen servers do it
[QUOTE=Smeone;49099861]Well I want to do this too button_model, And I have seen servers do it[/QUOTE]
That's because they change the button tool code, not the convar.
[QUOTE=code_gs;49100022]That's because they change the button tool code, not the convar.[/QUOTE]
Okay.. how would I go about doing that lmao?
[QUOTE=Smeone;49101761]Okay.. how would I go about doing that lmao?[/QUOTE]
[url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/button.lua#L20[/url]
[QUOTE=code_gs;49106305][url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/button.lua#L20[/url][/QUOTE]
Eh wasn't what I was looking for, Thanks for your help anyways I'll be releasing the way I did it and the reason behind it later.
Sorry, you need to Log In to post a reply to this thread.