- Sets get out of jail free for the player
- 0413: set_player [player handle] get_
out_ of_ jail_ free [int]
- [player handle]
- The handle of the player
- 0 = disable out of jail free (default), = enable out of jail free
This opcode sets get out of jail free for the player. When enabled, if the player is busted, you will not lose any cash after respawning but weapons will still be removed. The get out of jail free works once only, so to allow this effect again you have to enable it through this opcode again. The value set with this opcode is saved in block 16 of the save file in GTA III. Although the opcode does not exist in Vice City and San Andreas, the behavior still exists and can be enabled through other means.
For Vice City
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_0413 // [email protected] - input param (player handle) // [email protected] - input param (set) [email protected] *= 0x170 // size of each player info struct [email protected] += 0x94AD28 // base address for player info [email protected] += 0x145 // get out of jail free offset 05DF: write_memory [email protected] size 1 value [email protected] virtual_protect 0 05F6: ret 0
Use this line as a substitute for opcode 0413. This can be placed anywhere within the external script:
05F5: call_scm_func @opcode_0413 inputs 2 player_handle [player handle] get_out_of_jail_free [int]
The value set using this technique is saved in block 18 of the save file in Vice City.
set, toggle, player, get, out, free, prison, jail, police, busted