First, textdraws must be in a loop.
Second, font/size etc. must be put before drawing the textdraw.
Code:
{$CLEO}
wait 3000
0000: nop
:text
wait 0
03F0: enable_text_draw 1
033F: set_text_draw_letter_size 1.0 3.0 // font size (height, width)
081C: draw_text_outline 1 RGBA 0 0 0 255 // text outilne (1/0)(RGBA)
0340: set_text_draw_RGBA 255 255 255 255 // text color (RGBA)
0349: set_text_draw_font 3 // text font 0/1/2/3
033E: set_draw_text_position 320.0 180.333 GXT 'BJ_PUSH' // Finally, showing the textdraw. First two parameters are position screen XY, second is GXT. You can only use GXT, not custom things like '%s' etc. (will explain more under)
jump @text // loop
If you want to use custom text in your font(like your name, car name etc.) you need to use a method called gxt hacking;
Code:
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'BJ_PUSH' 1@
0AA5: call 0x718600 2 pop 2 1@ "springfield"
'BJ_PUSH' is the GXT you edit(you can use all other GXTs) now 'BJ_PUSH' = 'springfield', not 'PUSH"
"springfield" = the custom text, you can use 0AD3 with a dynamic text.
Like this;
Code:
0AD3: 2@ = "opcode is black"
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'BJ_PUSH' 1@
0AA5: call 0x718600 2 pop 2 1@ 2@
Fonts are;
For numbers it the same, but you can use variables.
Code:
0226: 0@ = $player_actor HEALTH
045A: draw_text_1number posX posY GXT 'NUMBER' number 0@