Difference between revisions of "03F0"

From GTAMods Wiki
Jump to navigation Jump to search
(page rewrite)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 03F0=1, %1d%
+
| games      = {{Icon|t}}
| description = Sets the method of the text draw.
+
| command    = USE_TEXT_COMMANDS
| p1          = Boolean
+
| description = Sets text display
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
| syntax1    = 03F0: enable_text_draw [''int'']
 +
| p1t        = [''int'']
 +
| p1d        = 0 = remove text, 1 = enable text
 
}}
 
}}
  
This opcode sets the method of the text draw.Disabling it clears all currently drawn stuff.
+
This opcode allows the removal of all text displayed using opcodes such as [[033E]].
  
==Flag==
+
== Example ==
0 - Text will disappear instantly.<br>
+
The following example using Sanny Builder demonstrates the usage of this opcode along with a display text opcode in a loop. Press the CAMERA key to increase the value of the counter on the screen.
1 - Text will disappear really quickly.
+
<syntaxhighlight lang="scm">
 +
const
 +
NUMBER = 0@
 +
end
  
==Sanny Builder Example==
+
while true
<source lang="scm">03F0: enable_text_draw 1</source>
+
    wait 10
 +
    if
 +
        00E1:  player 0 pressed_button 13  // camera key
 +
    then
 +
        NUMBER += 1
 +
    end
 +
    045A: text_draw_1number 10.0 10.0 'NUMBER' NUMBER
 +
    03F0: enable_text_draw 0
 +
end
 +
</syntaxhighlight>
  
==Keywords==
+
== Keywords ==
Text, draw
+
use, enable, text, draw, commands
 +
 
 +
[[Category:Code Snippets]]

Revision as of 07:19, 26 January 2016

GTA III Vice City San Andreas USE_TEXT_COMMANDS


Description
Sets text display
Syntax
03F0: enable_text_draw [int]
Parameter
[int]
0 = remove text, 1 = enable text

This opcode allows the removal of all text displayed using opcodes such as 033E.

Example

The following example using Sanny Builder demonstrates the usage of this opcode along with a display text opcode in a loop. Press the CAMERA key to increase the value of the counter on the screen.

const
NUMBER = 0@
end

while true
    wait 10
    if
        00E1:   player 0 pressed_button 13  // camera key
    then
        NUMBER += 1
    end
    045A: text_draw_1number 10.0 10.0 'NUMBER' NUMBER
    03F0: enable_text_draw 0
end

Keywords

use, enable, text, draw, commands