Difference between revisions of "021D"

From GTAMods Wiki
Jump to navigation Jump to search
m
(highlight)
 
Line 12: Line 12:
 
== For Vice City ==
 
== For Vice City ==
 
This opcode does not exist in Vice City but it is possible to set bomb shops to free. 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:
 
This opcode does not exist in Vice City but it is possible to set bomb shops to free. 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:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
:opcode_021D
+
<span class="nl">:opcode_021D</span>
// 0@ - input param (set)
+
<span class="c1">// 0@ - input param (set)</span>
05DF: write_memory 0xA10B32 size 1 value 0@ virtual_protect 0  // set value
+
05DF: write_memory <span class="m">0xA10B32</span> size <span class="m">1</span> value <span class="nv">0@</span> virtual_protect <span class="m">0</span> <span class="c1">// CGarages::BombsAreFree</span>
05F6: ret 0
+
05F6: ret <span class="m">0</span>
</syntaxhighlight>
+
}}
  
 
Use this line as a substitute for opcode 021D. This can be placed anywhere within the external script:
 
Use this line as a substitute for opcode 021D. This can be placed anywhere within the external script:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
05F5: call_scm_func @opcode_021D inputs 1 set [int]
+
05F5: call_scm_func <span class="nl">@opcode_021D</span> inputs <span class="m">1</span> set [int]
</syntaxhighlight>
+
}}
  
 
The value set using this technique is saved in [[Saves (GTA VC)#Block 2: Garages|block 2 of the save file]].
 
The value set using this technique is saved in [[Saves (GTA VC)#Block 2: Garages|block 2 of the save file]].

Latest revision as of 04:49, 7 December 2016

GTA III SET_FREE_BOMBS


Description
Set bomb shops to free
Syntax
021D: set_free_bomb_shop_to [int]
Parameter
[int]
0 = not free, 1 = free

This opcode sets all bomb shops to free. You can have your vehicle fitted even with no money, and no money will be deducted after using it. The value set with this opcode is saved in block 2 of the save file.

For Vice City

This opcode does not exist in Vice City but it is possible to set bomb shops to free. 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_021D
// 0@ - input param (set)
05DF: write_memory 0xA10B32 size 1 value 0@ virtual_protect 0  // CGarages::BombsAreFree
05F6: ret 0

Use this line as a substitute for opcode 021D. This can be placed anywhere within the external script:

05F5: call_scm_func @opcode_021D inputs 1 set [int]

The value set using this technique is saved in block 2 of the save file.

Keywords

set, free, bomb, shop, 8-Ball