0130

From GTAMods Wiki
Jump to navigation Jump to search

GTA III HAS_PLAYER_BEEN_ARRESTED


Description
Checks if the player is arrested
Syntax
0130:   player [player handle] busted
Parameter
[player handle]
The handle of the player

This conditional opcode returns true if the busted screen pops up.

For Vice City

This opcode does not exist in Vice City but it is still possible to check if the player is busted. 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_0130
// [email protected] - input param (player handle)
[email protected] *= 0x170  // size of each player info struct
[email protected] += 0x94AD28  // base address for player info
[email protected] += 0xCC  // wasted/busted status offset
05E0: [email protected] = read_memory [email protected] size 1 virtual_protect 0  // read status
    [email protected] == 2  // is busted
05F6: ret 0

Use this line as a substitute for opcode 03C9. This can be placed anywhere within the external script as a conditional statement.

// ...
if
    05F5: call_scm_func @opcode_0130 inputs 1 player_handle [player_handle]
then
    // [RETURNED TRUE]
else
    // [RETURNED FALSE]
end
// ...

Keywords

check, player, busted, arrested

See also

  • GTA III Vice City San Andreas 0256, checks if the player is playing