Difference between revisions of "0004"

From GTAMods Wiki
Jump to navigation Jump to search
(My INI is now disontinued.)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Number of parameters(P):''' 2
+
{{Icon|trilogy}} '''SET_VAR_INT'''
 +
<hr />
 +
'''Description'''
 +
: Sets the value of a global variable to a specified integer.
 +
'''Syntax'''
 +
: 0004: [''global var''] = [''int'']
 +
: [''global var''] = [''int'']
 +
'''Parameter'''
 +
: [''global var'']
 +
:: Global variable
 +
: [''int'']
 +
:: Integer value
  
'''Works in:''' <br>III, VC, SA
+
This opcode sets the value of a global variable to a specified integer.
  
'''Barton's Mission Builder Syntax:'''<br>
+
== Keywords ==
0004: $MyVar = 1
+
set, global, integer, variable, [[math]]
  
'''Sanny Builder Syntax:'''<br>
+
== See also ==
$MyVar = 1
+
* [[0005]] &ndash; sets flt value of global var
 +
* [[0006]] &ndash; sets int value of local var
 +
* [[0007]] &ndash; sets flt value of local var
  
'''ini variations:'''<br>
+
[[Category:OpCodes]][[Category:Math OpCodes]]
''original:'' 0004=2,%1d% = %2d% <br>
 
''PLPynton:'' 0004=2,%1d% = %2d%  <br>
 
 
 
'''C++ Hook Syntax:'''
 
 
 
''Spookie's Vice City C++ Hook:'' const SCRIPT_COMMAND setgi = { 0x0004, "i" };<br>
 
''op9080's San Andreas C++ Hook:'' DEFINE_OPCODE(setgi, 0x0004, "ii");<br>
 
 
 
'''Description:'''
 
 
 
This opcode sets a global variable (P1) to a specified integer (P2).
 
 
 
'''Parameters:'''
 
 
 
P1 = Global Varible Name (ex, $MyVar)<br>
 
P2 = Integer Value (ex, 500)
 
 
 
[[Category:OpCodes]]
 

Latest revision as of 21:57, 5 February 2015

GTA III Vice City San Andreas SET_VAR_INT


Description

Sets the value of a global variable to a specified integer.

Syntax

0004: [global var] = [int]
[global var] = [int]

Parameter

[global var]
Global variable
[int]
Integer value

This opcode sets the value of a global variable to a specified integer.

Keywords

set, global, integer, variable, math

See also

  • 0005 – sets flt value of global var
  • 0006 – sets int value of local var
  • 0007 – sets flt value of local var