Difference between revisions of "0992"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{OpCode | |
− | + | | games = {{Icon|SA}} | |
− | ''' | + | | command = SET_PLAYER_CYCLE_WEAPON_BUTTON |
− | ''' | + | | description = Sets the player's cycle weapon button |
− | ''' | + | | syntax1 = 0992: set_player [''player handle''] weapons_scrollable [''int''] |
+ | | p1t = [''player handle''] | ||
+ | | p1d = The [[0053|handle of the player]] | ||
+ | | p2t = [''int''] | ||
+ | | p2d = 0 = not scrollable, 1 = scrollable (default) | ||
+ | }} | ||
− | == | + | == For GTA III and Vice City == |
− | + | This opcode does not exist in GTA III and Vice City but it is possible to disable weapon cycling. 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"> | |
+ | :opcode_0992 | ||
+ | // 0@ - input param (set) | ||
+ | if | ||
+ | 0@ == 0 | ||
+ | then | ||
+ | 05DF: write_memory 0x4AA538 size 2 value 0x9090 virtual_protect 1 // cycle right disabled | ||
+ | 05DF: write_memory 0x4AA568 size 2 value 0x9090 virtual_protect 1 // cycle left disabled | ||
+ | else | ||
+ | 05DF: write_memory 0x4AA538 size 2 value 0x0674 virtual_protect 1 // cycle right enabled | ||
+ | 05DF: write_memory 0x4AA568 size 2 value 0x0674 virtual_protect 1 // cycle left enabled | ||
+ | end | ||
+ | 05F6: ret 0 | ||
+ | </syntaxhighlight> | ||
− | = | + | or for GTA III: |
− | + | <syntaxhighlight lang="scm"> | |
+ | :opcode_0992 | ||
+ | // 0@ - input param (set) | ||
+ | if | ||
+ | 0@ == 0 | ||
+ | then | ||
+ | 05DF: write_memory 0x493917 size 2 value 0x9090 virtual_protect 1 | ||
+ | 05DF: write_memory 0x493947 size 2 value 0x9090 virtual_protect 1 | ||
+ | else | ||
+ | 05DF: write_memory 0x493917 size 2 value 0x0774 virtual_protect 1 | ||
+ | 05DF: write_memory 0x493947 size 2 value 0x0774 virtual_protect 1 | ||
+ | end | ||
+ | 05F6: ret 0 | ||
+ | </syntaxhighlight> | ||
− | [[Category: | + | Use this line as a substitute for opcode 0992. This can be placed anywhere within the external script: |
+ | <syntaxhighlight lang="scm"> | ||
+ | 05F5: call_scm_func @opcode_0992 inputs 1 set [int] | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | == Keywords == | ||
+ | set, player, cycle, weapon, button, scroll, scrollable | ||
+ | |||
+ | [[Category:Code Snippets]] |
Latest revision as of 16:23, 19 June 2016
SET_PLAYER_CYCLE_WEAPON_BUTTON
- Description
- Sets the player's cycle weapon button
- Syntax
- 0992: set_player [player handle] weapons_scrollable [int]
- Parameter
- [player handle]
- The handle of the player
- [int]
- 0 = not scrollable, 1 = scrollable (default)
For GTA III and Vice City
This opcode does not exist in GTA III and Vice City but it is possible to disable weapon cycling. 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_0992
// 0@ - input param (set)
if
0@ == 0
then
05DF: write_memory 0x4AA538 size 2 value 0x9090 virtual_protect 1 // cycle right disabled
05DF: write_memory 0x4AA568 size 2 value 0x9090 virtual_protect 1 // cycle left disabled
else
05DF: write_memory 0x4AA538 size 2 value 0x0674 virtual_protect 1 // cycle right enabled
05DF: write_memory 0x4AA568 size 2 value 0x0674 virtual_protect 1 // cycle left enabled
end
05F6: ret 0
or for GTA III:
:opcode_0992
// 0@ - input param (set)
if
0@ == 0
then
05DF: write_memory 0x493917 size 2 value 0x9090 virtual_protect 1
05DF: write_memory 0x493947 size 2 value 0x9090 virtual_protect 1
else
05DF: write_memory 0x493917 size 2 value 0x0774 virtual_protect 1
05DF: write_memory 0x493947 size 2 value 0x0774 virtual_protect 1
end
05F6: ret 0
Use this line as a substitute for opcode 0992. This can be placed anywhere within the external script:
05F5: call_scm_func @opcode_0992 inputs 1 set [int]
Keywords
set, player, cycle, weapon, button, scroll, scrollable