CLEO Help Cleo rgb car color

CLEO related
Status
Not open for further replies.

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
Hi, how can i make a car color to change slowly, from one rgb color to another ?
I made something like this:
Code:
{$CLEO .cs}
0000: NOP
REPEAT
    WAIT 100
UNTIL SAMP.Available()

WHILE TRUE
    WAIT 0
    1@ = 255
    2@ = 0
    3@ = 0
    FOR 3@ = 0 TO 255
        WAIT 0 
        GOSUB @color
    END
    3@ = 255
 
    FOR 1@ = 255 DOWNTO 0
        WAIT 0   
        GOSUB @color
    END
    1@ = 0
 
    FOR 2@ = 0 TO 255
        WAIT 0 
        GOSUB @color
    END   
    2@ = 255
   
    FOR 3@ = 255 DOWNTO 0
        WAIT 0 
        GOSUB @color
    END 
    3@ = 0
    FOR 1@ = 0 TO 255
        WAIT 0
        GOSUB @color 
    END 
    1@ = 255 
    FOR 2@ = 255 DOWNTO 0
        WAIT 0 
        GOSUB @color
    END   
    2@ = 0   
END

:color  
    if 
   Actor.Driving($PLAYER_ACTOR)
then
0811: 20@ = actor $PLAYER_ACTOR used_car 
0B67: render a 1@ r 2@ g 3@ b 0xFF to_argb 5@
0229: set_car 20@ primary_color_to 5@ secondary_color_to 5@ 
     0AF8: samp add_message_to_chat "Test" color 5@ 
                                  end
return
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Use 03C0 to get the car handle, and that won't work cause paramaters for 0229 are colorsID(0-128).
If you want to change a car color to use a custom RGB you'd need to change that color rgb value in memory.
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
springfield link said:
Use 03C0 to get the car handle, and that won't work cause paramaters for 0229 are colorsID(0-128).
If you want to change a car color to use a custom RGB you'd need to change that color rgb value in memory.

And can you give me please the memory locations that i have to change ?
With carcols.dat can i do something ?
This is what i want https://www.youtube.com/watch?v=0xJ8aMMZdy8
 

renko

Active member
Joined
Jul 8, 2014
Messages
58
Reaction score
0
LeHidend link said:
http://rghost.net/7w69xvcHr

is from [member=111]springfield[/member]
Hmm..it isn't working. When i enter a car, it makes the car black and that s it
 
Status
Not open for further replies.
Top