Hi, i would like to know the command to remove the physic gun in the server.cfg file.
Cant
Why would you want to do that, and you Cant.
[QUOTE=Zulthus;17353713]Why would you want to do that, and you Cant.[/QUOTE]
Maybe hes making an rp script?
Take a look at darkrp boy :)
[code]
lua_run hook.Add("Think","concommandsftw",function() for _,v in pairs(ents.FindByClass("weapon_physgun")) do v:Remove() end end)
[/code]
Put that on a line.
No, i don't wanna REMOVE the physic gun i just don't want to respawn with it.I know it's possible the command is like w_physics "0" or something like that.
Adding this to your cfg should do the trick, of course you should just put it in a file in lua/autorun.
[code]lua_run "hook.Add("PlayerSpawn","NoPhysForYou",function(ply) ply:StripWeapon("weapon_physgun") end)"[/code]
Yes I know it's hacky.
This is not working.
Right, I had forgotten the quotes. And I don't know how to bind a console command with quotes inside it so we'll need some more help here.
[QUOTE=Crazy Quebec;17357794]Right, I had forgotten the quotes. And I don't know how to bind a console command with quotes inside it so we'll need some more help here.[/QUOTE]
Quotes aren't needed. Atleast not when running through the console, might be needed for cfg files though I dunno.
Just place this in any lua file (open notepad and save as .lua) in garrysmod/lua/autorun
[code]hook.Add("PlayerSpawn","NoPhysForYou",function(ply)
ply:StripWeapon("weapon_physgun")
end)[/code]
There, done.
Sorry, you need to Log In to post a reply to this thread.