Artisz Posted July 27, 2016 Share Posted July 27, 2016 Hi! I downloaded the colorpicker resource from here, and I want to make with this a customizable HUD, but I have some problems. I could make that in colopicker set an element's color from the hud with set/getElementData, but I want to do that set the elements's color separately. And I don't know what is the problem. addEventHandler( 'onClientRender', root, function() q1 = getElementData(localPlayer, "R1") w1 = getElementData(localPlayer, "G1") e1 = getElementData(localPlayer, "B1") q2 = getElementData(localPlayer, "R2") w2 = getElementData(localPlayer, "G2") e2 = getElementData(localPlayer, "B2") felso_hatter = dxDrawRectangle ( 997,10,358,76, tocolor ( q1, w1, e1, 150 ) ) also_hatter = dxDrawRectangle ( 997,10,3,76, tocolor ( q2, w2, e2, 150 ) ) end) function szin1() exports.cpicker:openPicker(1, color, "HUD Színválasztó: Felso Háttér") addEventHandler("onColorPickerChange", root, pick1) end addCommandHandler("felsohatter", szin1) function szin2() exports.cpicker:openPicker(2, color, "HUD Színválasztó: Alsó Háttér") addEventHandler("onColorPickerChange", root, pick2) end addCommandHandler("alsohatter", szin2) function pick1(element, hex, r, g, b) setElementData(localPlayer, "R1", r) setElementData(localPlayer, "G1", g) setElementData(localPlayer, "B1", b) end function pick2(element, hex, r, g, b) setElementData(localPlayer, "R1", r) setElementData(localPlayer, "G2", g) setElementData(localPlayer, "B3", b) end Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now