Difference between revisions of "02B9"

From GTAMods Wiki
Jump to navigation Jump to search
(why include opcodes that are not affected by or that do not affect this opcode?)
(updating page + code for vc)
Line 1: Line 1:
{{OpCode
+
{{Icon|3}} {{Icon|SA}}
| ini        = 02B9=1,%1d%
+
<hr />
| description = Deactivates a [[garage]]
+
'''Description'''
| p1          = Garage handle (variable in GTA III, short string in San Andreas)
+
: Deactivates a [[garage]]
| game        = [[GTA 3]], [[San Andreas]]
+
'''Syntax'''
}}
+
: {{Icon|3}} 02B9: deactivate_garage [''garage handle'']
This opcode deactivates a garage, which is created by opcode [[0219]] in GTA III and by the [[GRGE]] section of the [[IPL]] in San Andreas. Garages can be reactivated using opcode [[0299]].
+
: {{Icon|SA}} 02B9: deactivate_garage [''string'']
 +
: {{Icon|SA}} Garage.Deactivate( [''string''] )
 +
'''Parameter'''
 +
: [''garage handle'']
 +
:: The [[Garage#GTA3_2|handle of the garage]], for GTA III
 +
: [''string'']
 +
:: The [[Garage#San Andreas 2|name of the garage]], for San Andreas
  
==Sanny Builder example==
+
This opcode deactivates a garage. It can be reactivated by using opcode [[0299]]. Normal garage functions will be limited, like save garages not opening, spray shops not being able to finish spraying, and bomb shops not being able to finish fitting the bomb.
  
<source lang="scm">02B9: deactivate_garage 'VECMOD'</source>
+
== For Vice City ==
 +
This opcode does not exist in Vice City, but the deactivation behavior of the garage remains. The following example, using Sanny Builder with [[CLEO]] for Vice City, and tested on US v1.0, should work similarly to this opcode
 +
<source lang="scm">
 +
008B: 0@ = [garage handle]  // change [garage handle] to the actual handle of the garage, i.e. $655 for the Links View Apartment garage
 +
0@ *= 0xA8  // size of each garage block
 +
0@ += 0x812668  // add to beginning of garage block
 +
0@ += 0x5  // offset that controls deactivation
 +
05DF: write_memory 0@ size 1 value 1 virtual_protect 0  // deactivate garage
 +
</source>
  
==Keywords==
+
== Keywords ==
 
garage, deactivate, disable
 
garage, deactivate, disable
 +
 +
[[Category:OpCodes]][[Category:Code Snippets]]

Revision as of 00:12, 28 December 2011

GTA III San Andreas


Description

Deactivates a garage

Syntax

GTA III 02B9: deactivate_garage [garage handle]
San Andreas 02B9: deactivate_garage [string]
San Andreas Garage.Deactivate( [string] )

Parameter

[garage handle]
The handle of the garage, for GTA III
[string]
The name of the garage, for San Andreas

This opcode deactivates a garage. It can be reactivated by using opcode 0299. Normal garage functions will be limited, like save garages not opening, spray shops not being able to finish spraying, and bomb shops not being able to finish fitting the bomb.

For Vice City

This opcode does not exist in Vice City, but the deactivation behavior of the garage remains. The following example, using Sanny Builder with CLEO for Vice City, and tested on US v1.0, should work similarly to this opcode

008B: 0@ = [garage handle]  // change [garage handle] to the actual handle of the garage, i.e. $655 for the Links View Apartment garage
0@ *= 0xA8  // size of each garage block
0@ += 0x812668  // add to beginning of garage block
0@ += 0x5  // offset that controls deactivation
05DF: write_memory 0@ size 1 value 1 virtual_protect 0  // deactivate garage

Keywords

garage, deactivate, disable