yair1221 Posted September 29, 2010 Share Posted September 29, 2010 i tried using that opcode in such structure: its a main.scm :cockpitthread 'cockpit'wait 1000390: load_txd_dictionary 'COCKPIT'038F: load_texture "COCKPIT" as 1 // Load dictionary with 0390 first03F0: enable_text_draw 003F0: enable_text_draw 1if oractor.InCar($PLAYER_ACTOR, $VIPERD)actor.InCar($PLAYER_ACTOR, $VIPERVIID)jf @cockpit0A39: get_vehicle_camera_mode_to 1@if1@ == 0jf @cockpit038D: draw_texture 1 position 350.0 300.0 size 750.0 600.0 RGBA 255 255 255 25503c0: 0@ $PLAYER_ACTORrepeatwait 0ifnot 1@ == 0thenjump @cockpitenduntil not actor.InCar($PLAYER_ACTOR, 0@)jump @cockpitend_thread i tried doing it like that 03F0: enable_text_draw 1 03F0: enable_text_draw 0 i tried that: 03F0: enable_text_draw 1 and that: 03F0: enable_text_draw 0 nothing helped, i can see the texture for one little second, and it disappears, if i remove it...i can see the texture and no...in case you are asking, the condition havent changed, so its impossible that the opcode is doing its job...the jump is never executed, because the condition never changed, the camera stayed at first person, but the texture didnt appear, it wouldnt appear anyway, because i used it once...before the repeat...and that condition was true... Link to comment https://gtaforums.com/topic/460118-enable_text_draw/ Share on other sites More sharing options...
ZAZ Posted September 29, 2010 Share Posted September 29, 2010 Show the calculated values with text_draw opcode this can help to find failures or to prove running scripts 03F0: enable_text_draw 1045A: text_draw_1number 250.0 40.0 'NUMBER' 3@ opcode 045A: can display the value of the inserted variable but it can only display an integer value to display floats need to invert the float first into an integer with opcode 0092: opcode 045A: needs to be read permanently in a loop connected with opcode 03F0: which must be read before opcode 045A: is a function of the categorie text_draw like the opcodes to display textures of GTASA\models\txd To set opcode 03F0: to 1 as first and than the text_draw opcode in a permanent readed loop is the mostly done variation to use the text_draw opcodes e.g. in the race tournament to show the time and the rank Same to show textures 03F0: enable_text_draw 1038D: draw_texture 1 position 350.0 300.0 size 750.0 600.0 RGBA 255 255 255 255 {$CLEO .cs}:cockpit_0thread 'cockpit'wait 1000:cockpit_1wait 0ifPlayer.Defined($PLAYER_CHAR)else_jump @cockpit_10390: load_txd_dictionary 'COCKPIT'038F: load_texture "COCKPIT" as 1 // Load dictionary with 0390 first:cockpit_3wait 003F0: enable_text_draw 1038D: draw_texture 1 position 350.0 300.0 size 750.0 600.0 RGBA 255 255 255 255jump @cockpit_3 Text_draw opcodes have a disadvantage: They disturb Text massages of some other kinds of text opcodes Or invers, they will not be shown if a text is shown of some other kinds of text opcodes To display a value with 045A: without permanent reading in a loop can be used a trick: 03F0: text_draw_toggle 10001: wait 50 ms03F0: text_draw_toggle 00001: wait 50 ms045A: text_draw_1number 250.0 40.0 'NUMBER' 3@ Link to comment https://gtaforums.com/topic/460118-enable_text_draw/#findComment-1060144134 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now