Hi ! I have a big problem and I need your help. I want to make a drug system with visual effects by changing colors. I've been working on this for 3 weeks and I can't do it. I've asked a lot of people but either the answers were incomplete or wrong. The founder of the famous server "Post Bellum" sent me this script but it doesn't work. By the way, if some people have the drug plugin of the "CiderTwo" gamemode converted for HL2RP, I'm really into it! Thanks for your answer 🙂
local ITEM = Clockwork.item:New();
ITEM.name = "Verred";
ITEM.uniqueID = "verred_it";
ITEM.cost = 6;
ITEM.model = "models/props_junk/garbage_glassbottle003a.mdl";
ITEM.weight = 0.6;
ITEM.category = "Storage";
ITEM.business = true;
ITEM.description = "ItemBeerDesc";
-- Called when a player uses the item.
function ITEM:OnUse(player, target, iAllowance, tIgnoreEnts)
player:SetNWBool( "Verred", true )
end
local tab = {
[ "$pp_colour_addr" ] = 1,
[ "$pp_colour_addg" ] = 0.02,
[ "$pp_colour_addb" ] = 0,
[ "$pp_colour_brightness" ] = 0,
[ "$pp_colour_contrast" ] = 1,
[ "$pp_colour_colour" ] = 3,
[ "$pp_colour_mulr" ] = 0,
[ "$pp_colour_mulg" ] = 0.02,
[ "$pp_colour_mulb" ] = 0
}
hook.Add( "RenderScreenspaceEffects", "color_modify_example", function()
if player:GetNWBool( "Verred" ) then
DrawColorModify( tab )
end
end )
ITEM:Register();