Difference between revisions of "02B9"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
− | {{Icon|3}} {{Icon|SA}} | + | {{Icon|3}} {{Icon|SA}} '''DEACTIVATE_GARAGE''' |
<hr /> | <hr /> | ||
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode| | <onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode| | ||
Line 22: | Line 22: | ||
:opcode_02B9 | :opcode_02B9 | ||
// 0@ - input param (garage handle) | // 0@ - input param (garage handle) | ||
− | 0@ *= 0xA8 // size of each garage | + | 0@ *= 0xA8 // size of each garage struct |
− | 0@ += 0x812668 // | + | 0@ += 0x812668 // base address for garages |
0@ += 0x5 // activation offset | 0@ += 0x5 // activation offset | ||
05DF: write_memory 0@ size 1 value 1 virtual_protect 0 // deactivate garage | 05DF: write_memory 0@ size 1 value 1 virtual_protect 0 // deactivate garage | ||
Line 30: | Line 30: | ||
Use this line as a substitute for opcode 02B9. This can be placed anywhere within the external script: | Use this line as a substitute for opcode 02B9. This can be placed anywhere within the external script: | ||
<source lang="scm"> | <source lang="scm"> | ||
− | 05F5: call_scm_func @opcode_02B9 inputs 1 garage_handle [garage handle] | + | 05F5: call_scm_func @opcode_02B9 inputs 1 garage_handle [garage handle] |
</source> | </source> | ||
Line 36: | Line 36: | ||
garage, deactivate, disable | garage, deactivate, disable | ||
− | [[Category:OpCodes]][[Category:Code Snippets]] | + | [[Category:OpCodes]] |
+ | [[Category:Code Snippets]] |
Revision as of 05:33, 29 July 2015
Description
- Deactivates a garage
Syntax
- 02B9: deactivate_garage [garage handle]
- 02B9: deactivate_garage [string]
- Garage.Deactivate( [string] )
Parameter
- [garage handle]
- The handle of the garage, for GTA III
- [string]
- The name of the garage, for San Andreas (max size 8 characters)
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 in an external script (not the main one), and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file:
:opcode_02B9
// 0@ - input param (garage handle)
0@ *= 0xA8 // size of each garage struct
0@ += 0x812668 // base address for garages
0@ += 0x5 // activation offset
05DF: write_memory 0@ size 1 value 1 virtual_protect 0 // deactivate garage
05F6: ret 0
Use this line as a substitute for opcode 02B9. This can be placed anywhere within the external script:
05F5: call_scm_func @opcode_02B9 inputs 1 garage_handle [garage handle]
Keywords
garage, deactivate, disable