CLEO Help Rainbow textdraw

CLEO related
Status
Not open for further replies.

Adrean.

New member
Joined
Mar 1, 2016
Messages
1
Reaction score
0
Hello guys.It's been 3 days since i decided to make this mod and i failed over and over.

I want to make a rainbow zonetext.

You know what zonetext is so i won't explain.

this is the code


Code:
//-------------MAIN---------------
9@ = 0 
11@ = 0 
12@ = 0 
15@ = 1 
17@ = 0 
0000: NOP 

:NONAME_37
wait 0 
gosub @NONAME_171 
gosub @NONAME_226 
gosub @NONAME_288 
gosub @NONAME_337 
if or
  9@ == 1 
  11@ == 1 
  12@ == 1 
  15@ == 0 
else_jump @NONAME_119 
03F0: enable_text_draw 0 
jump @NONAME_164 

:NONAME_119
if and
   not Actor.Driving($PLAYER_ACTOR)
00E1:   player $PLAYER_CHAR pressed_key 4 
else_jump @NONAME_153 
03F0: enable_text_draw 0 
jump @NONAME_164 

:NONAME_153
03F0: enable_text_draw 1 
gosub @NONAME_413 

:NONAME_164
jump @NONAME_37 

:NONAME_171
0A8D: 8@ = read_memory 11989093 size 4 virtual_protect 0 
if 
  8@ == 1 
else_jump @NONAME_217 
9@ = 1 
jump @NONAME_224 

:NONAME_217
9@ = 0 

:NONAME_224
return 

:NONAME_226
0A8D: 10@ = read_memory 9873356 size 4 virtual_protect 0 
if or
  10@ == 1 
  10@ == 2 
else_jump @NONAME_279 
11@ = 1 
jump @NONAME_286 

:NONAME_279
11@ = 0 

:NONAME_286
return 

:NONAME_288
if 
06B9:   cutscene_data_loaded 
else_jump @NONAME_328 
if 
82E9:   not cutscene_reached_end 
else_jump @NONAME_321 
12@ = 1 

:NONAME_321
jump @NONAME_335 

:NONAME_328
12@ = 0 

:NONAME_335
return 

:NONAME_337
0A8D: 13@ = read_memory 12216172 size 4 virtual_protect 0 
0A8D: 14@ = read_memory 12231675 size 4 virtual_protect 0 
if and
  13@ == 2 
  14@ == 0 
else_jump @NONAME_404 
15@ = 0 
jump @NONAME_411 

:NONAME_404
15@ = 1 

:NONAME_411
return 

:NONAME_413
gosub @NONAME_581 
if 
  17@ == 0 
else_jump @NONAME_572 
gosub @NONAME_627 
gosub @NONAME_657 
if or
05AD:   s$93 == 'LA' // s$ == short  // Los Santos
05AD:   s$93 == 'SF' // s$ == short  // San Fierro
05AD:   s$93 == 'VE' // s$ == short  // Las Venturas
else_jump @NONAME_519 
05A9: s$93 = 'CT' // s$ 

:NONAME_519
if 
05AD:   s$93 == 'SAN_AND' // s$ == short  // San Andreas
else_jump @NONAME_558 
05A9: s$93 = 'CN' // s$ 

:NONAME_558
gosub @NONAME_957 
jump @NONAME_579 

:NONAME_572
gosub @NONAME_1067 

:NONAME_579
return 

:NONAME_581
077E: get_active_interior_to 16@ 
if 
  16@ == 0 
else_jump @NONAME_618 
17@ = 0 
jump @NONAME_625 

:NONAME_618
17@ = 1 

:NONAME_625
return 

:NONAME_627
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0843: get_zone_at 1@ 2@ 3@ nameA_to s$93 // 8-byte string 
return 

:NONAME_657
gosub @NONAME_1007 
if 
  7@ == 0 
else_jump @NONAME_696 
05A9: s$95 = 'CS' // s$ 

:NONAME_696
if 
  7@ == 1 
else_jump @NONAME_728 
05A9: s$95 = 'LA' // s$  // Los Santos

:NONAME_728
if 
  7@ == 2 
else_jump @NONAME_760 
05A9: s$95 = 'SF' // s$  // San Fierro

:NONAME_760
if 
  7@ == 3 
else_jump @NONAME_792 
05A9: s$95 = 'VE' // s$  // Las Venturas

:NONAME_792
if 
05AD:   s$93 == 'SAN_AND' // s$ == short  // San Andreas
else_jump @NONAME_831 
05A9: s$95 = 'SAN_AND' // s$  // San Andreas

:NONAME_831
if 
05AD:   s$93 == 'LA' // s$ == short  // Los Santos
else_jump @NONAME_870 
05A9: s$95 = 'LA' // s$  // Los Santos

:NONAME_870
if 
05AD:   s$93 == 'SF' // s$ == short  // San Fierro
else_jump @NONAME_909 
05A9: s$95 = 'SF' // s$  // San Fierro

:NONAME_909
if 
05AD:   s$93 == 'VE' // s$ == short  // Las Venturas
else_jump @NONAME_948 
05A9: s$95 = 'VE' // s$  // Las Venturas

:NONAME_948
gosub @NONAME_1017 
return 

:NONAME_957
03E0: draw_text_behind_textures 1 
033F: set_text_draw_letter_size 0.5 1.4 
0342: set_text_draw_centered 1 
081C: draw_text_outline 2 RGBA 0 0 0 255 
0340: set_text_draw_RGBA 30@ 31@ 32@ 255 
033E: set_draw_text_position 310.0 426.0 GXT s$93 
return 

:NONAME_1007
0842: 7@ = player $PLAYER_CHAR town_number 
return 

:NONAME_1017
03E0: draw_text_behind_textures 1 
033F: set_text_draw_letter_size 0.0 0.0 
0342: set_text_draw_centered 1 
081C: draw_text_outline 2 RGBA 0 0 0 255 
033E: set_draw_text_position 540.0 800.0 GXT s$95 
return 

:NONAME_1067
gosub @NONAME_1090 
gosub @NONAME_1100 
gosub @NONAME_1017 
return 

:NONAME_1090
094B: v$99 = get_active_interior_name_from_actor $PLAYER_ACTOR // 16-byte string 
return 

:NONAME_1100
03E0: draw_text_behind_textures 1 
033F: set_text_draw_letter_size 0.3 1.2 
0342: set_text_draw_centered 1 
081C: draw_text_outline 2 RGBA 0 0 0 255 
033E: set_draw_text_position 180.0 326.0 GXT v$99 
return 

:NONAME_2
wait 0 
30@ = 255 
31@ = 0 
32@ = 0 
32@ = 0 

:NONAME_35
wait 0 
gosub @NONAME_957
32@ += 1 
  32@ > 255 
jf @NONAME_35 
32@ = 255 
30@ = 255 

:NONAME_84
wait 0 
gosub @NONAME_957
30@ -= 1 
  0 > 31@ 
jf @NONAME_84 
30@ = 0 
31@ = 0 

:NONAME_130
wait 0 
gosub @NONAME_957 
31@ += 1 
  31@ > 255 
jf @NONAME_130 
31@ = 255 
32@ = 255 

:NONAME_179
wait 0 
gosub @NONAME_957
32@ -= 1 
  0 > 32@ 
jf @NONAME_179 
32@ = 0 
30@ = 0 

:NONAME_225
wait 0 
gosub @NONAME_957
30@ += 1 
  30@ > 255 
jf @NONAME_225 
30@ = 255 
31@ = 255 

:NONAME_274
wait 0 
gosub @NONAME_957
31@ -= 1 
  0 > 31@ 
jf @NONAME_274 
31@ = 0 
jump @NONAME_2



The mode is default untill i added this code who makes the text to be colored in more colors like rainbow colors.

Code:
:NONAME_2
wait 0 
30@ = 255 
31@ = 0 
32@ = 0 
32@ = 0 

:NONAME_35
wait 0 
gosub @NONAME_957
32@ += 1 
  32@ > 255 
jf @NONAME_35 
32@ = 255 
30@ = 255 

:NONAME_84
wait 0 
gosub @NONAME_957
30@ -= 1 
  0 > 31@ 
jf @NONAME_84 
30@ = 0 
31@ = 0 

:NONAME_130
wait 0 
gosub @NONAME_957 
31@ += 1 
  31@ > 255 
jf @NONAME_130 
31@ = 255 
32@ = 255 

:NONAME_179
wait 0 
gosub @NONAME_957
32@ -= 1 
  0 > 32@ 
jf @NONAME_179 
32@ = 0 
30@ = 0 

:NONAME_225
wait 0 
gosub @NONAME_957
30@ += 1 
  30@ > 255 
jf @NONAME_225 
30@ = 255 
31@ = 255 

:NONAME_274
wait 0 
gosub @NONAME_957
31@ -= 1 
  0 > 31@ 
jf @NONAME_274 
31@ = 0 
jump @NONAME_2

What i did wrong on this code ? i have a video to show u guys how my mod is working.

It keeps showing only blue.Ignore the text from the video.


https://www.youtube.com/watch?v=3eET-bVhZTU

:sadpepe: :angry:
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,492
Reaction score
236
Location
( ͡° ͜ʖ ͡°)
Try this color loop by me

Code:
{$CLEO .cs}
0000:

CONST
    R = 1@
    G = 2@
    B = 3@
    COLOR = 3@
END



WHILE TRUE
    WAIT 0
    R = 255
    G = 0
    B = 0
    FOR B = 0 TO 255
        WAIT 0  
        GOSUB @DRAW   
    END 
    B = 255

    FOR R = 255 DOWNTO 0 
        WAIT 0    
        GOSUB @DRAW
    END 
    R = 0

    FOR G = 0 TO 255
        WAIT 0  
        GOSUB @DRAW  
    END    
    G = 255
    
    FOR B = 255 DOWNTO 0 
        WAIT 0  
        GOSUB @DRAW  
    END   
    B = 0
    FOR R = 0 TO 255
        WAIT 0 
        GOSUB @DRAW   
    END  
    R = 255   
    FOR G = 255 DOWNTO 0 
        WAIT 0  
        GOSUB @DRAW  
    END    
    G = 0    
END


:DRAW
0A8C: write_memory 0x58A514 size 1 value R virtual_protect 1
0A8C: write_memory 0x58A50D size 1 value G virtual_protect 1
0A8C: write_memory 0x58A506 size 1 value B virtual_protect 1
0A8C: write_memory 0x58A4FF size 1 value 255 virtual_protect 1
RETURN
 
Status
Not open for further replies.
Top