0992

From GTAMods Wiki
Jump to navigation Jump to search

San Andreas 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
// [email protected] - input param (set) 
if
    [email protected] == 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
// [email protected] - input param (set) 
if
    [email protected] == 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