Set your own keys for script mods with SannybuilderI often asked for key_press changing of my mods and I think many people wishes to can do it theirself
So here a little explain to modify simple key_press checks
Download newest version of Sannybuilder from Seeman at
http://sannybuilder.com/Install Sannybuilder and create a folder for your scripts
Therefor youre promt to indicate your GTASA-Install dir.
Then start Sannybuilder and decompile the mod
If your changes are done, click on compile.
This saves the changes and overwrite the opend file
(sanny creates a decompiled txt of the script file by decompiling in same folder where the script file is placed)
The main functions can be found as icon button in the menue bar1. Decompile: sanny opens script files with extensions
.CS,
.CM or
.SCM2. Compile: sanny compiles by default to a
[Name]main.SCMSanny compiles automaticly to Cleoscript files, if the script have a Cleo-Direktive as entry
{$CLEO .cs} = Cleo-Direktive, will be compiled to
Name.CS{$CLEO .cm} = Cleo-Direktive, will be compiled to
Name.CM
Alternativ you can decompile a script by doubleclick onto the script file
but this requires first to give windows the instruction to open a file with specified exe.
Therfore click with right mouse button on the script file to pop up the context menue and choose "open with"
than navigate to sanny.exe and set a hook to open the file allways with this exe. Than click on ok.
______________________________________________________________________________________
______________________________________________________________________________________
Then search for the key_press codes by using search function (button with fieldglas icon)
Sanny starts the search than from beginning of the script.
Press F3 to get one more founding of the same search
search for
0AB0: or
00E1: or
key_pressed or
pressed_key______________________________________________________________________________________
opcode
00E1: is the original from Rockstar and can be set in controller menue
| CODE |
| 00E1: player 0 pressed_key 15 |
player 0 means the default player in opposite to player 1 for second player of console version
its allways player 0 in our scripts
pressed_key 15 is the real key_press number
15 = enter/exit
The explanation of the 00E1: key numbers is documented in Sannybuilder HELP: SCM Documentation >> GTA SA >> Keypress numbers
They are discribed as function which are changeable in controller menue
______________________________________________________________________________________
opcode
0AB0: can only be used if Cleo is installed
8 = Backspace (Decimal)
The explanation of the 0AB0: key numbers is documented in Sannybuilder HELP: CLEO 3 Code Library >> Virtual key codes (for 0AB0)
You will find than a table with 3 columns
1.column--------------------------/ 2.column------------------------------/ 3.column
charackter which should used / key_press number decimal version / key_press number hex version
Its easier to use decimal version. Just insert the number which is shown
To use hex version needs to write 0x<number> ; exemple: key K = 0x4B
______________________________________________________________________________________
The Sannybuilder
HELPChoose HELP on menue, then Content to find informations about key_press numbers