• Players won't take damage even with sbox_godmode 0
    2 replies, posted
It's a custom and newly started gamemode that derives from sandbox. No matter what I do, I can't take any damage. No fall damage, prop damage, damage from NPCs. Nothing. When googling for it, I only find tons of posts about sbox_godmode, but that's already set to 0. I also tried: [CODE]function GM:PlayerShouldTakeDamage(ply, attacker) return true end[/CODE] and I tried doing this when players spawn: [CODE]ply:GodDisable()[/CODE] But I still won't take any damage. Any Ideas why? ------------------------------------------------------------------------------------------------------------------------------------ Further testing: [CODE]function GM:EntityTakeDamage( target, dmginfo ) if ( target:IsPlayer() ) then print(target:HasGodMode()) print(dmginfo:GetDamage()) print(target:Health()) end end[/CODE] This shows that[B] god mode is false[/B],[B] damage is recieved[/B], but the [B]health stays the same[/B] (and I really don't want to re-code the entire health/kill system, the default one is perfectly fine.. when it works)
use sbox_playershurtplayers 1
[QUOTE=AJ10017;49511028]use sbox_playershurtplayers 1[/QUOTE] It's already set to 1. But it's not a PvP issue, I take no damage whatsoever. Edit: I think I figured out why. The map has an [URL="https://developer.valvesoftware.com/wiki/Env_global"]env_global [/URL] which sets "gordon is invincible" to true. Anybody know how to set that value to false with lua? Edit2: Finally! Searched through a list of all HL2 console commands, and found out I had to use this console command: [CODE]global_set gordon_invulnerable 0[/CODE] Issue solved.
Sorry, you need to Log In to post a reply to this thread.