How can i remove all trigger hurt effects using the console ingame?
I just need the code.
[lua]hook.Add("PlayerShouldTakeDamage", "No trigger_hurt", function(ply, attacker)
if(attacker:GetClass() == "trigger_hurt") then
return false;
end
end);[/lua]
Place this to your lua/autorun/server -folder, and save it as "notriggerhurt.lua". It should permanently disable all damage from trigger_hurts on your server.
Or -
[code]lua_run for _, v in pairs( ents.FindByClass( "trigger_hurt" ) ) do v:Remove() end[/code]
if you want to exec it in the console alone.
Sorry, you need to Log In to post a reply to this thread.