Difference between revisions of "07F2"
Jump to navigation
Jump to search
(page updates + code snippet) |
|||
Line 1: | Line 1: | ||
− | {{ | + | {{Icon|SA}} '''IS_PLAYER_PERFORMING_STOPPIE''' |
− | + | <hr /> | |
− | + | '''Description''' | |
− | + | : Checks if the player is performing a stoppie | |
− | + | '''Syntax''' | |
− | + | : 07F2: player [''player handle''] performing_stoppie | |
− | + | '''Parameter''' | |
− | + | : [''player handle''] | |
+ | :: The [[0053|handle of the player]] | ||
+ | '''Native analog''' | ||
+ | : [[IS_PLAYER_PERFORMING_STOPPIE]] | ||
− | ==Keywords== | + | This conditional opcode returns true when the player is performing a stoppie. A stoppie is being performed if only the front wheel of a motorcycle or bicycle is touching the ground. The body of the bike and the rear wheel cannot touch any solid surface. |
+ | |||
+ | == For Vice City == | ||
+ | This opcode does not exist in Vice City but it is possible to detect if the player is performing a stoppie. 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. | ||
+ | <syntaxhighlight lang="scm"> | ||
+ | :opcode_07F2 | ||
+ | 05E0: 0@ = read_memory 0x94AE2C size 4 virtual_protect 0 // get stoppie duration | ||
+ | if | ||
+ | 0@ > 0 // change duration limit to suit your needs | ||
+ | then | ||
+ | 0485: true | ||
+ | else | ||
+ | 059A: false | ||
+ | end | ||
+ | 05F6: ret 0 | ||
+ | </syntaxhighlight> | ||
+ | Use this line as a substitute for opcode 07F2. This can be placed anywhere within the external script as a conditional statement. | ||
+ | <syntaxhighlight lang="scm"> | ||
+ | 05F5: call_scm_func @opcode_07F2 inputs 0 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Keywords == | ||
check, player, performing, stoppie | check, player, performing, stoppie | ||
+ | |||
+ | [[Category:OpCodes]] | ||
+ | [[Category:Code Snippets]] |
Revision as of 02:28, 17 July 2015
Description
- Checks if the player is performing a stoppie
Syntax
- 07F2: player [player handle] performing_stoppie
Parameter
- [player handle]
Native analog
This conditional opcode returns true when the player is performing a stoppie. A stoppie is being performed if only the front wheel of a motorcycle or bicycle is touching the ground. The body of the bike and the rear wheel cannot touch any solid surface.
For Vice City
This opcode does not exist in Vice City but it is possible to detect if the player is performing a stoppie. 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.
:opcode_07F2
05E0: 0@ = read_memory 0x94AE2C size 4 virtual_protect 0 // get stoppie duration
if
0@ > 0 // change duration limit to suit your needs
then
0485: true
else
059A: false
end
05F6: ret 0
Use this line as a substitute for opcode 07F2. This can be placed anywhere within the external script as a conditional statement.
05F5: call_scm_func @opcode_07F2 inputs 0
Keywords
check, player, performing, stoppie