Difference between revisions of "050F"
Jump to navigation
Jump to search
(highlight) |
|||
Line 1: | Line 1: | ||
− | {{Icon|SA}} | + | {{OpCode |
− | + | | games = {{Icon|SA}} | |
− | + | | command = GET_MAX_WANTED_LEVEL | |
− | + | | description = Gets the maximum [[wanted level]] | |
− | + | | syntax1 = 050F: get_max_wanted_level_to [''var''] | |
− | + | | p1t = [''var''] | |
− | + | | p1d = Variable to store the max wanted level, an integer value | |
− | + | }} | |
− | |||
This opcode stores the maximum attainable wanted level, which can be set using opcode [[01F0]]. | This opcode stores the maximum attainable wanted level, which can be set using opcode [[01F0]]. | ||
Line 13: | Line 12: | ||
== For GTA III and Vice City == | == For GTA III and Vice City == | ||
This opcode does not exist in GTA III and Vice City but it is possible to get the maximum wanted level. The following example, using Sanny Builder with [[CLEO]] for GTA III and 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 for Vice City: | This opcode does not exist in GTA III and Vice City but it is possible to get the maximum wanted level. The following example, using Sanny Builder with [[CLEO]] for GTA III and 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 for Vice City: | ||
− | < | + | {{Pre|class=sb-code|1= |
− | :opcode_050F | + | <span class="nl">:opcode_050F</span> |
− | 05E0: 0@ = read_memory 0x6910D8 size 4 virtual_protect 0 | + | 05E0: <span class="nv">0@</span> = read_memory <span class="m">0x6910D8</span> size <span class="m">4</span> virtual_protect <span class="m">0</span> |
− | 05F6: ret 1 0@ | + | 05F6: ret <span class="m">1</span> <span class="nv">0@</span> |
− | </ | + | }} |
or for GTA III: | or for GTA III: | ||
− | < | + | {{Pre|class=sb-code|1= |
− | :opcode_050F | + | <span class="nl">:opcode_050F</span> |
− | 05E0: 0@ = read_memory 0x5F7714 size 4 virtual_protect 0 | + | 05E0: <span class="nv">0@</span> = read_memory <span class="m">0x5F7714</span> size <span class="m">4</span> virtual_protect <span class="m">0</span> |
− | 05F6: ret 1 0@ | + | 05F6: ret <span class="m">1</span> <span class="nv">0@</span> |
− | </ | + | }} |
Use this line as a substitute for opcode 050F. This can be placed anywhere within the external script: | Use this line as a substitute for opcode 050F. This can be placed anywhere within the external script: | ||
− | < | + | {{Pre|class=sb-code|1= |
− | + | 05F5: call_scm_func <span class="nl">@opcode_050F</span> inputs <span class="m">0</span> store_to [<span class="k">var</span>] | |
− | </ | + | }} |
== Keywords == | == Keywords == | ||
get, store, max, maximum, wanted, level | get, store, max, maximum, wanted, level | ||
− | |||
− | |||
− |
Latest revision as of 04:07, 26 November 2016
- Description
- Gets the maximum wanted level
- Syntax
- 050F: get_max_wanted_level_to [var]
- Parameter
- [var]
- Variable to store the max wanted level, an integer value
This opcode stores the maximum attainable wanted level, which can be set using opcode 01F0.
For GTA III and Vice City
This opcode does not exist in GTA III and Vice City but it is possible to get the maximum wanted level. The following example, using Sanny Builder with CLEO for GTA III and 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 for Vice City:
:opcode_050F 05E0: 0@ = read_memory 0x6910D8 size 4 virtual_protect 0 05F6: ret 1 0@
or for GTA III:
:opcode_050F 05E0: 0@ = read_memory 0x5F7714 size 4 virtual_protect 0 05F6: ret 1 0@
Use this line as a substitute for opcode 050F. This can be placed anywhere within the external script:
05F5: call_scm_func @opcode_050F inputs 0 store_to [var]
Keywords
get, store, max, maximum, wanted, level