Talk:Gamemode.PlayerShouldTakeDamage
From GMod Wiki
PVP Damage only?
Is this PVP only damage? Can't seem to prevent NPCs from damaging the player. May have to use EntityTakeDamage. --Unrealomega 12:15, 8 March 2009 (GMT-6)
Small Change
Hello. I noticed that the second example wasn't quite working, and I successfully diagnosed the issue. The problem came from "if pl:IsPlayer() == 1 then"
I removed the "== 1" and the code worked. Now it is "if ply:IsPlayer() then"