Difference between revisions of "050F"

From GTAMods Wiki
Jump to navigation Jump to search
(highlight)
 
Line 1: Line 1:
{{Icon|SA}} '''GET_MAX_WANTED_LEVEL'''
+
{{OpCode
<hr />
+
| games      = {{Icon|SA}}
'''Description'''
+
| command    = GET_MAX_WANTED_LEVEL
: Gets the maximum [[wanted level]]
+
| description = Gets the maximum [[wanted level]]
'''Syntax'''
+
| syntax1    = 050F: get_max_wanted_level_to [''var'']
: 050F: get_max_wanted_level_to [''var'']
+
| p1t        = [''var'']
'''Parameter'''
+
| p1d        = Variable to store the max wanted level, an integer value
: [''var'']
+
}}
:: Variable to store the integer value of the wanted level
 
  
 
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:
<syntaxhighlight lang="scm">
+
{{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>
</syntaxhighlight>
+
}}
  
 
or for GTA III:
 
or for GTA III:
<syntaxhighlight lang="scm">
+
{{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>
</syntaxhighlight>
+
}}
  
 
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:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
05F5: call_scm_func @opcode_050F inputs 0 store_to [var]
+
05F5: call_scm_func <span class="nl">@opcode_050F</span> inputs <span class="m">0</span> store_to [<span class="k">var</span>]
</syntaxhighlight>
+
}}
  
 
== Keywords ==
 
== Keywords ==
 
get, store, max, maximum, wanted, level
 
get, store, max, maximum, wanted, level
 
[[Category:OpCodes]]
 
[[Category:Code Snippets]]
 

Latest revision as of 04:07, 26 November 2016

San Andreas GET_MAX_WANTED_LEVEL


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