CLEO Help Textdraw text colors

CLEO related
Status
Not open for further replies.

Fruktinsh

New member
Joined
Jan 28, 2014
Messages
2
Reaction score
0
Hello, I need add different color to textdraw text, example:
 
BG: %i - purple
RG: %i - blue
VG: %i - orange
 
In this line: 0AD3: 2@ = format "Ballas %i Rrifas %i Vagos %i" 21@ 22@ 23@

If I try to add ~B~... codes it makes some text lines...
0AD3: 2@ = format "Ballas %i ~b~Rifas %i ~y~Vagos %i" 21@ 22@ 23@

bdfd184964c44aa5b115e91aeedc7ab7.png



Code:
{$CLEO .cs}
0000: NOP 
repeat
wait 50
until 0AFA: is_samp_structures_available

:CHECK
wait 5000
21@ = 0
22@ = 0
23@ = 0
for 1@ = 0 to 200
    0B37: samp 8@ = get_player_color 1@
    if
        8@ == 0xffd900d3
    then
        21@ += 1
    end
    if
        8@ == 0xff83bfbf
    then
        22@ += 1
    end
    if
        8@ == 0xffffc801
    then
        23@ += 1
    end        
end
0AC8: 2@ = allocate_memory_size 64
0AD3: 2@ = format "Ballas %i Rifas %i Vagos %i" 21@ 22@ 23@
0C48: samp textdraw 3@ create 2@ pos 10.0 190.0
0C4C: samp textdraw 3@ set_style 3
0C52: samp textdraw 3@ set_letter_size 0.4 1.5 color 0xFFFFFFFF
0C4E: samp textdraw 3@ set_outline 1 color 0x32000000
0AC9: free_allocated_memory 2@
jump @CHECK
 

Fruktinsh

New member
Joined
Jan 28, 2014
Messages
2
Reaction score
0
Never mind, found my mistake.

Solution:
Code:
{$CLEO .cs}
0000: NOP 
repeat
wait 50
until 0AFA: is_samp_structures_available

:CHECK
wait 5000
21@ = 0
22@ = 0
23@ = 0
for 1@ = 0 to 200
   0B37: samp 8@ = get_player_color 1@
   if
       8@ == 0xffd900d3
   then
       21@ += 1
   end
   if
       8@ == 0xff83bfbf
   then
       22@ += 1
   end
   if
       8@ == 0xffffc801
   then
       23@ += 1
   end        
end
    0AC8: 2@ = allocate_memory_size 16
    0AC8: 3@ = allocate_memory_size 16
    0AC8: 4@ = allocate_memory_size 16
    0AD3: 2@ = format "Ballas %d" 21@
    0AD3: 3@ = format "Rifas %d" 22@
    0AD3: 4@ = format "Vagos %d" 23@
    0C48: samp textdraw 1 create 2@ pos 10.0 190.0
    0C48: samp textdraw 2 create 3@ pos 10.0 205.0
    0C48: samp textdraw 3 create 4@ pos 10.0 220.0
    0C4C: samp textdraw 1 set_style 3
    0C4C: samp textdraw 2 set_style 3
    0C4C: samp textdraw 3 set_style 3
    0C52: samp textdraw 1 set_letter_size 0.4 1.5 color 0xffd900d3
    0C52: samp textdraw 2 set_letter_size 0.4 1.5 color 0xff83bfbf
    0C52: samp textdraw 3 set_letter_size 0.4 1.5 color 0xffffc801
    0C4E: samp textdraw 1 set_outline 1 color 0x32000000 
    0C4E: samp textdraw 2 set_outline 1 color 0x32000000 
    0C4E: samp textdraw 3 set_outline 1 color 0x32000000  
jump @CHECK
 
Status
Not open for further replies.
Top