-- Drunk Effect --
hook.Add("RenderScreenspaceEffects","Drunk",function()
local tab = {}
tab[ "$pp_colour_addr" ] = 0
tab[ "$pp_colour_addg" ] = 0
tab[ "$pp_colour_addb" ] = 0
tab[ "$pp_colour_brightness" ] = 1
tab[ "$pp_colour_contrast" ] = 1.2
tab[ "$pp_colour_mulr" ] = 0
tab[ "$pp_colour_mulg" ] = 1
tab[ "$pp_colour_mulb" ] = 1
DrawColorModify(tab)
DrawMotionBlur(1.3)
end)
This is clientside. I wanna put this hook, here:
function ENT:Use(use, ply)
end
How can i do it?
I don't really understand what you mean. You're trying to only draw motion blur and modify the screen color when someone is using an entity, or after they have used it?
I guess that seeing it's a drunk function, you want it so that when the entity gets used it gets removed and the effect gets applied to the player, so the best way of achieving that would be with net messages on the use function on the server and as soon as the player uses the bottle, send the net message to the player which activates a local variable on the client, and with that local variable, you'll draw the ScreenSpaceEffects for as long as you want.
Already solved, but, thanks for the message. A coin for you.
Sorry, you need to Log In to post a reply to this thread.