freudo Posted June 3, 2015 Share Posted June 3, 2015 Hey Not saving nitro color. and I select a color not changing color Client: --------------------------------------------------------------------------------- -- -- Nitro shader -- -- --------------------------------------------------------------------------------- addEventHandler("onClientResourceStart",resourceRoot, function() nitroShader = dxCreateShader("nitro.fx") setTimer(updateNitroColor,1000,1,255,0,0) end) -- This function will set the new color of the nitro function updateNitroColor(r,g,b) if nitroShader then if r and g and b then engineApplyShaderToWorldTexture (nitroShader,"smoke") dxSetShaderValue (nitroShader, "gNitroColor", r/255, g/0, b/0 ) end end end -- This function will reset the nitro back to the original function resetNitroColor() if nitroShader then engineRemoveShaderFromWorldTexture(nitroShader,"smoke") end end function nitro () openPicker ( "nitrorenk", "#FFFFFF", "Nitro rengi" ) end addCommandHandler("nitro", nitro) addEvent ( "onColorPickerOK", true ) addEventHandler ( "onColorPickerOK", root, function ( id, hex, r, g, b ) if ( id == "nitrorenk" ) then updateNitroColor(r,g,b) end end ) Link to comment
Enargy, Posted June 4, 2015 Share Posted June 4, 2015 Do you have colorPicker code? I mean, script called as fair I know cpicker? Link to comment
freudo Posted June 4, 2015 Author Share Posted June 4, 2015 Yes Yes all things have. I select a color code on colorpicker but not changing bitti color 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