CLEO Help Done

CLEO related
Status
Not open for further replies.

T3KTONIT

Well-known member
Joined
Sep 2, 2013
Messages
308
Reaction score
5
Re: Possible? Make a text all time changing colour/Rainbow in textdraw

I don't even....

see this is the kind of shit i hate about cleo.. people need to learn atleast one programming language first to understand some things..

you have to generate 3 sets of random integers between 1 and 255

Code:
0209: 1@ = random_int_in_ranges 1 255
0209: 2@ = random_int_in_ranges 1 255
0209: 3@ = random_int_in_ranges 1 255

0340: set_text_draw_RGBA %d %d %d 255 1@ 2@ 3@

if this doesn't work then do this :

Code:
0209: 1@ = random_int_in_ranges 0 4294967295
0B6F: render font 0@ draw_text "whatever multicolor text" pos 20@ 21@  color 1@
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: Possible? Make a text all time changing colour/Rainbow in textdraw

If you want it in a loop without sampfuncs:

Code:
{$CLEO .cs}

0000: NOP

03F0: enable_text_draw 1

while true
wait 0
0209: 31@ = random_int_in_ranges 0 255
0209: 30@ = random_int_in_ranges 0 255
0209: 29@ = random_int_in_ranges 0 255
033F: set_text_draw_letter_size 1.0 3.0
0349: set_text_draw_font 3 
0340: set_text_draw_RGBA 31@ 30@ 29@ 255
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED369' 1@
0AA5: call 0x718600 2 pop 2 1@ "opcode is black"
033E: set_draw_text_position 520.0 122.0 GXT 'CRED369'  // Push
end

with sampfuncs: i don't know if this code works or not maybe not because they are not hex colors, is the part of the reply of T3K.

Code:
{$CLEO .cs}

0000: NOP

0B6D: render 0@ = create_font "Arial" height 10 flags 0x4

while true
wait 0
0209: 1@ = random_int_in_ranges 0 4294967295
20@ = 280
21@ = 480
0B6F: render font 0@ draw_text "whatever multicolor text" pos 20@ 21@ color 1@
end
 
Status
Not open for further replies.
Top