Remove PhysicGun

Hi, i would like to know the command to remove the physic gun in the server.cfg file.


Why would you want to do that, and you Cant.

Maybe hes making an rp script?

Take a look at darkrp boy :slight_smile:

You can’t using your .cfg file. And I doubt if you’re still trying to use server.cfg to “code” a server that you would know what a lua script is or how to install it.

lua_run hook.Add("Think","concommandsftw",function() for _,v in pairs(ents.FindByClass("weapon_physgun")) do v:Remove() end end)

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.

lua_run "hook.Add("PlayerSpawn","NoPhysForYou",function(ply) ply:StripWeapon("weapon_physgun") end)"

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.

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


There, done.