• How do i change the contrast/brightness of the player's screen?
    7 replies, posted
How do i change the contrast/brightness of the player's screen? When a player type: "!drug", his screen will change contrast and brightness. I need a code about this, if someone can help me it will very nice
Take a look at the Draw* global functions on the wiki, for example this one: https://wiki.garrysmod.com/page/Global/DrawColorModify Also look at the Source Code for Post Processing effects from Sandbox.
Thanks very much. I will look.
you're missing an end), read the lua errors, that's useful
hook.Add("RenderScreenspaceEffects","isAlive?",function() local cm = {     ["$pp_colour_addr"] = 52,     ["$pp_colour_addg"] = 1,     ["$pp_colour_addb"] = 2,     ["$pp_colour_brightness"] = 3,     ["$pp_colour_contrast"] = 4,     ["$pp_colour_colour"] = 1,     ["$pp_colour_mulr"] = 1,     ["$pp_colour_mulg"] = 2,     ["$pp_colour_mulb"] = 4, } if !LocalPlayer():Alive then           DrawColorModify(cm) end end) Sorry, i didnt paste all the code. There is, don't works.
Please look up basic Lua tutorials before you start messing around with Lua, it will help everyone involved save some time.
... okay, but, can you solve this question for me? i would be very happy =\
You fucked up writing Alive() Now do everyone a favour and go watch some Code Blue videos.
Sorry, you need to Log In to post a reply to this thread.