Get Player color and change vehicle color to the player color
#1

Hi again!
I want to change the color of vehicle to the color of player when he enters a vehicle
i did a try but i failed, is there anyone who can help me making this?


pawn Code:
new x[50] = GetPlayerColor(playerid);  = error 008: must be a constant expression; assumed zero
    new color = strval(x);                        
    ChangeVehicleColor(vehicleid, color , color );
Reply
#2

new color = GetPlayerColor(Playerid);
ChangeVehicleColor(vehicleid, color , color );

work?
Reply
#3

nope it did not i already checked it
Reply
#4

It doesn't work like that. Car color ids do not relate to the color circle; they're just arbitrarily assigned by Rockstar Games. There are 16,777,216 different colors and yet only 256 car colors. Unless you use ONLY the colors defined at the bottom of this page, there is no way (or at least not an easy way) to map them back to a car color.
Reply
#5

Understood.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)