This is my script for the damage effects, I do not understand hooks at all, and hook.call has no explanation on the Gmod wiki.
function GM:EntityTakeDamage( ent )
if ent:IsPlayer() then
Hp = ent:Health()
if(Hp <= 41) then
Mult = (200 - Hp - 159)
hook.Call( "RenderScreenspaceEffects", RenderEFunc, Hp, Mult )
end
end
end
---
local function RenderEFunc(Hp, Mult)
local tab = {}
tab[ "$pp_colour_addr" ] = 5 * Mult
tab[ "$pp_colour_addg" ] = 0
tab[ "$pp_colour_addb" ] = 0
tab[ "$pp_colour_brightness" ] = 0
tab[ "$pp_colour_contrast" ] = 1
tab[ "$pp_colour_colour" ] = 1
tab[ "$pp_colour_mulr" ] = Hp * 2
tab[ "$pp_colour_mulg" ] = 1
tab[ "$pp_colour_mulb" ] = 1
DrawColorModify( tab )
DrawMotionBlur( 0.5, 0.5, 0.1)
DrawBloom( 1, Hp/100, 3, 9, 9, 1, 255, 0, 0 )
end
hook.Add( "RenderScreenspaceEffects", "RenderEFunc", RenderEFunc )