sbox_plpldamage 1 and sbox_godmode don't work?


I have a very strange problem… I can’t turn people damage on so if you get shot you get hurt. I’m running DarkRP svn with some extra jobs.

I have in server.cfg:

sbox_plpldamage “1”
sbox_godmode “0”
sbox_playergod “0”

In autoexec.cfg I have nothing.

What can I do to solve this??

Do it manually in console.

I also tried that, when I do sbox_godmode 0 I see in the server that it is changed. But if I use sbox_plpldamage 1 I get no message ingame and no message in console.


I found this in a other topic. I have a dedicated server with SRCDS. Maybe that fix will work but how I have to name the lua file in that directory?

Is it a dedicated server?
Because the command “sbox_plpldamage” doesn’t seem to work on dedicated servers.
Here’s a short script to make the command work again:
view plaincopy to clipboardprint?

  1. function GAMEMODE:PlayerShouldTakeDamage( ply, attacker )
  2. if ( SinglePlayer() ) or GetConVarNumber( “sbox_plpldamage” ) == 1 then return true
  3. elseif attacker:IsPlayer() then return false end
  4. return true
  5. end

function GAMEMODE:PlayerShouldTakeDamage( ply, attacker )
if ( SinglePlayer() ) or GetConVarNumber( “sbox_plpldamage” ) == 1 then return true
elseif attacker:IsPlayer() then return false end
return true

Put this in a lua-file in “garrysmod/lua/autorun/server” (If the directory doesn’t exist, create it).
When you restart your server, the “sbox_plpldamage” command should work, unless the players have godmode turned on.

sbox_plpldamage must be 0 to allow shooting other people.

I don’t know why that is, but it is…

Ok it’s fixed now. Thank you very much!

Yeah Darkrp does that with some things.

Actually, it’s a bug in Garry’s Mod in every gamemode. sbox_plpldamage 1 means player vs. player damage is off, while 0 means on. I wouldn’t be surprised if this exists through all Source games.

plpl means player vs player, if god mode is off but you dont want people to kill eachother, that can be one. You can still kill them with props and such ;O

You mean zero. Setting plpldamage to one would make players invulnerable versus each other.