Make vehicle color darker -
Jstylezzz - 11.11.2012
Hi everyone,
Like the title says, I want to make my vehicle's color darker, let's say every 10 seconds.
Like the hex code has the last 2 numbers to control the opacity, I wanted to manipulate the vehicle's color in the same way.
So that will be, every 10 seconds: vehicle color-0.1 opacity.
Not sure if this is well enough explained, but I can't think of anything better to explain it..
Thanks in advance
Respuesta: Make vehicle color darker -
Magic_Time - 11.11.2012
SendRconCommand
Re: Respuesta: Make vehicle color darker -
Jstylezzz - 11.11.2012
Quote:
Originally Posted by Magic_Time
SendRconCommand
|
How would SendRconCommand help here?
Respuesta: Make vehicle color darker -
Magic_Time - 11.11.2012
Let's say.
You create a command to change the color of the car.
You'll make a timer for 10 seconds.
And the car color will change when you call it-.
Re: Make vehicle color darker -
Jstylezzz - 11.11.2012
I know that, the real problem is, to take the color the car already has, let's say yellow, and every 10 seconds it has to become darker..
Respuesta: Make vehicle color darker -
Magic_Time - 11.11.2012
I don't know if it's possible to make the car get darker.
What would happen if you store the hex values on an array?
So you call them when you want to make the car color dark?
Re: Make vehicle color darker -
Jstylezzz - 11.11.2012
I think that would be the only "easy" solution there is :\
Thanks, I will try it with a few test colors first, shouldn't be too hard
Re: Make vehicle color darker -
Magic_Time - 11.11.2012
I was looking for something.
I found it out.
May it help you?
PHP Code:
stock RGBAToHex(r, g, b, a)
{
return (r<<24 | g<<16 | b<<8 | a);
}
stock HexToRGBA(colour, &r, &g, &b, &a)
{
r = (colour >> 24) & 0xFF;
g = (colour >> 16) & 0xFF;
b = (colour >> 8) & 0xFF;
a = colour & 0xFF;
}
Re: Make vehicle color darker -
Jstylezzz - 11.11.2012
I think this will be very helpfull, thanks
Re: Make vehicle color darker -
Ballu Miaa - 11.11.2012
With this link you can download MP2's - vFunc.
By which you can get GetVehicleColor() and try to make it darker according to what you get. It will be a lot of calculations but it is possible this way also!
Re: Make vehicle color darker -
Jstylezzz - 16.11.2012
Quote:
Originally Posted by Ballu Miaa
|
Thanks alot

I will try to make something with this