Difference between revisions of "0004"

From GTAMods Wiki
Jump to navigation Jump to search
 
Line 25: Line 25:
 
'''Parameters:'''
 
'''Parameters:'''
  
P1 = Global Varible Name (ex, $MyVar)
+
P1 = Global Varible Name (ex, $MyVar)<br>
 
P2 = Integer Value (ex, 500)
 
P2 = Integer Value (ex, 500)
  
 
[[Category:OpCodes]]
 
[[Category:OpCodes]]

Revision as of 19:42, 17 February 2007

Number of parameters(P): 2

Works in:
III, VC, SA

Barton's Mission Builder Syntax:
0004: $MyVar = 1

Sanny Builder Syntax:
$MyVar = 1

ini variations:
original: 0004=2,%1d% = %2d%
PLPynton: 0004=2,%1d% = %2d%
spaceeinstein: 0004=2,%1d% = %2d%

C++ Hook Syntax:

Spookie's Vice City C++ Hook: const SCRIPT_COMMAND setgi = { 0x0004, "i" };
op9080's San Andreas C++ Hook: DEFINE_OPCODE(setgi, 0x0004, "ii");

Description:

This opcode sets a global variable (P1) to a specified integer (P2).

Parameters:

P1 = Global Varible Name (ex, $MyVar)
P2 = Integer Value (ex, 500)