29.05.2016, 12:10
Quote:
I'm looking to add a function to darken or lighten a piece of color with a function.
The color is in the format of GetPlayerColor, and I'd like to make it darker or lighter depending on a float value. Example to make a color darker. Code:
ChangeColorIntensity(GetPlayerColor(playerid),0.5) Code:
ChangeColorIntensity(GetPlayerColor(playerid),1.5) |
Code:
SetPlayerMarkerVisibility(playerid, alpha = 0xFF) { new oldcolor, newcolor; alpha = clamp(alpha, 0x00, 0xFF); oldcolor = GetPlayerColor(playerid); newcolor = (oldcolor & ~0xFF) | alpha; return SetPlayerColor(playerid, newcolor); }