Allow two or more players to kill each other whilst sbox_plpldamage is on

Basically, the title, thanks.

Kill each other with guns that is.



You would turn it off and then code something to keep people, not keep it on and allow people.

Just for something i was making. I’m going to try what you said.

maybe trace the bullets, and when they hit someone, use the function Kill() or something like that and you could use set health and stuff. maybe even NWInt ?

Making a internal damage system is indeed a good idea. However, you might need to edit some weapons or add some hooks to make it register the “fake” damage.

what he said :smiley:

Yeah, use SetNWInt(“Health” , pl:GetNWInt(“health”) - mydamage)


[lua]function GAMEMODE:PlayerShouldTakeDamage( victim, pl )
if( pl:Team() == victim:Team() and GetConVarNumber( “mp_friendlyfire” ) == 0 ) then – check the teams are equal and that friendly fire is off.
return false – do not damage the player

return true -- damage the player


[lua]function GM:PlayerShouldTakeDamage(victim, ply)
return not (pl:Team() == victim:Team() and GetConVarNumber( “mp_friendlyfire” ) == 0);

i would still go for the internal damage system because then you could make the hole thing blow up with ideas! like you could hook it then make you health slowly re heal, even though itd already done, its good practice

No it isn’t. Recreating the entire damage system used by Source is a stupid idea. There’s no reason to and it is not good practice. You can make people’s health reheal without making a custom damage system. Please don’t give bad advice when you don’t know what you’re talking about :geno: