0130

From GTAMods Wiki
Revision as of 04:58, 26 November 2016 by Spaceeinstein (talk | contribs) (highlight)
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
0@ *= 0x170  // size of each player info struct
0@ += 0x94ADF4  // wasted/busted status
05E0: 0@ = read_memory 0@ size 1 virtual_protect 0  // read status
    0@ == 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