IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

The Mod Showroom is only for posting previews/downloads of completed or near finished mods.
All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials

Pages: (2) [1] 2   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Set your own keys for script mods with Sannybuilde

 Help for the users
 
ZAZ  
Posted: Sunday, Apr 5 2009, 15:40
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




Set your own keys for script mods with Sannybuilder
I 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 bar

1. Decompile: sanny opens script files with extensions .CS, .CM or .SCM

2. Compile: sanny compiles by default to a [Name]main.SCM

Sanny 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

user posted image


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
CODE
0AB0:   key_pressed 8

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 HELP

Choose HELP on menue, then Content to find informations about key_press numbers

user posted image

Users WebsitePM
  Top
 

 
james227uk  
Posted: Sunday, Apr 5 2009, 17:21
Quote Post


One Spartan Army
Group Icon
Group: Andolini Mafia Family
Joined: Feb 5, 2008

en.gif

XXXXX



Nice tutorial ZAZ, should help people cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif


Offtopic: It's in the wrong section. I'm not gonna report it though, this topic may be kicked and you will have lost this work

lol kicked? wtf am I talking about? i mean locked

This post has been edited by james227uk on Sunday, Apr 5 2009, 21:20
Users WebsitePMXbox Live
  Top
 

 
ZAZ  
Posted: Sunday, Apr 5 2009, 17:37
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (james227uk @ Apr 5 2009, 17:21)
Offtopic: It's in the wrong section. I'm not gonna report it though, this topic may be kicked and you will have lost this work

No it isnt but I think users of script mods dont look into tut section
They mostly post in my topic or write me a pm. They should find directly this help where the mods are available.
The moderator should decide.

This post has been edited by ZAZ on Sunday, Apr 5 2009, 20:58
Users WebsitePM
  Top
 

 
Narcis_speed6  
Posted: Sunday, Apr 5 2009, 20:28
Quote Post


The Saint
Group Icon
Group: The Connection
Joined: Feb 28, 2008

jolly-roger.gif

Member Award




nice job ZAZ icon14.gif
this is a very helpfull tutorial,is good because you put it in mod showroom because allot of members will read it
icon14.gif icon14.gif icon14.gif icon14.gif cookie.gif cookie.gif cookie.gif cookie.gif cookie.gif
Users WebsitePM
  Top
 

 
james227uk  
Posted: Sunday, Apr 5 2009, 21:21
Quote Post


One Spartan Army
Group Icon
Group: Andolini Mafia Family
Joined: Feb 5, 2008

en.gif

XXXXX



Guess you got a point there
Users WebsitePMXbox Live
  Top
 

 
Seemann  
Posted: Sunday, Apr 5 2009, 22:19
Quote Post


Ruhe
Group Icon
Group: Members
Joined: Sep 3, 2004

ru.gif

Member Award




Users WebsitePM
  Top
 

 
BobbyBriggs  
Posted: Sunday, Apr 12 2009, 07:46
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 18, 2008

XXXXX



Hi, i was wondering how to make the gamepad keys react? i can only find the keyboard codes.
PM
  Top
 

 
ZAZ  
Posted: Sunday, Apr 12 2009, 10:23
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (BobbyBriggs @ Apr 12 2009, 07:46)
Hi, i was wondering how to make the gamepad keys react? i can only find the keyboard codes.

Only key_press checks with this opcode:
opcode 00E1: is the original from Rockstar and can be set in controller menue

go to
San Andreas / PAUSE MENUE / OPTIONS / CONTOLLER SETUP / REDEFINE CONTROLES /
FOOT CONTROLES OR VEHICLE CONTROLES

to set gamepadbutton for function

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 = VEHICLE_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


QUOTE
ONFOOT CONTROLS
  
    
# CONTROL GXT ENTRY VALUES
     
0 left/right  -- GO_LEFT /  -- GO_RIGHT
1 forward/backward  -- GO_FORWARD /  -- GO_BACK
2 special ctrl left/right  -- VEHICLE_LOOKLEFT/ -- VEHICLE_LOOKRIGHT
3 special ctrl up/down -unknown-
4 action/secondary fire  -- PED_ANSWER_PHONE/  -- PED_FIREWEAPON_ALT
5 previous weapon/zoom in    -- PED_CYCLE_WEAPON_LEFT/  -- PED_SNIPER_ZOOM_IN
6 aim weapon  -- PED_LOCK_TARGET
7 next weapon/zoom out  -- PED_CYCLE_WEAPON_RIGHT/  -- PED_SNIPER_ZOOM_OUT
8 group CTRL forward  -- GROUP_CONTROL_FWD
9 group CTRL back  -- GROUP_CONTROL_BWD
10  conversation - no  -- CONVERSATION_NO
11  conversation - yes  -- CONVERSATION_YES
12 (does not exist) -- -- --
13 change camera  -- CAMERA_CHANGE_VIEW_ALL_SITUATIONS
14 jump  -- PED_JUMPING
15 enter vehicle  -- VEHICLE_ENTER_EXIT
16 sprint  -- PED_SPRINT
17 fire  -- PED_FIREWEAPON
18 crouch  -- PED_DUCK
19 look behind  -- PED_LOOKBEHIND
     
LALT sneak  -- SNEAK_ABOUT
 
  
  
VEHICLE CONTROLS   
 
  
  
# CONTROL GXT ENTRY VALUES
     
0 left/right  -- VEHICLE_STEERLEFT/  -- VEHICLE_STEERRIGHT
1 steer back/up  -- VEHICLE_STEERUP/  -- VEHICLE_STEERDOWN  
2 special ctrl left/right  -- VEHICLE_TURRETLEFT/  -- VEHICLE_TURRETRIGHT (NUM6)
3 special control up/down  -- VEHICLE_TURRETUP/  -- VEHICLE_TURRETDOWN
4 secondary fire  -- VEHICLE_FIREWEAPON_ALT
5 look left  -- VEHICLE_LOOKLEFT
6 hand brake  -- VEHICLE_HANDBRAKE
7 look right  -- VEHICLE_LOOKRIGHT
8 next radio station  -- VEHICLE_RADIO_STATION_UP
9 previous radio station  -- VEHICLE_RADIO_STATION_DOWN
10 no  -- CONVERSATION_NO
11 yes / trip skip  -- CONVERSATION_YES
12 (does not exist) -- -- --
13 camera                      -- CAMERA_CHANGE_VIEW_ALL_SITUATIONS
14 brake/reserve  -- VEHICLE_BRAKE
15 enter/exit  -- VEHICLE_ENTER_EXIT
16 accelerate  -- VEHICLE_ACCELERATE
17 fire  -- VEHICLE_FIREWEAPON
18 horn  -- VEHICLE_HORN
19 submission  -- TOGGLE_SUBMISSIONS
     
RMB vehicle mouse look  -- VEHICLE_MOUSELOOK




This post has been edited by ZAZ on Sunday, Apr 12 2009, 10:38
Users WebsitePM
  Top
 

 
ikoshowa  
Posted: Sunday, Jul 5 2009, 14:17
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 25, 2008

XXXXX



hey zaz! i've tried a lot of different keys but everytime I changed the virtual key code of your carspawner mod, I crashed when I load a save... Could you modify this mod for me with the L key because my 2 doesn't work anymore...Thanks if you do! wink.gif
PM
  Top
 

 
2pacproducer2  
Posted: Sunday, Jul 5 2009, 16:12
Quote Post


Mack Pimp
Group Icon
Group: Members
Joined: Jul 12, 2008

lh.gif

XXXXX



Shouldn't this be in Tutorials section ?
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Sunday, Jul 5 2009, 16:53
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (ikoshowa @ Jul 5 2009, 14:17)
hey zaz! i've tried a lot of different keys but everytime I changed the virtual key code of your carspawner mod, I crashed when I load a save... Could you modify this mod for me with the L key because my 2 doesn't work anymore...Thanks if you do! wink.gif

And you only changed the number?

this is the key_press check for 2
CODE
if
0AB0:   key_pressed 50
jf @CAR_227


and to do it with L should like that
CODE
if
0AB0:   key_pressed 76
jf @CAR_227



QUOTE
Shouldn't this be in Tutorials section ?

It should be a help for the users. They often want to change the key_press number.
They often look here for mod scripts but dont read tutorials because they are not interessting in scripting.
Users WebsitePM
  Top
 

 
trickstar34  
Posted: Sunday, Jul 5 2009, 19:43
Quote Post


ATM, Money
Group Icon
Group: BUSTED!
Joined: Dec 14, 2008

us.gif

XXXXX



This should be pinned for you. wink.gif
PMYahooPlayStation Network
  Top
 

 
Deji  
Posted: Sunday, Jul 5 2009, 21:16
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



There's alot of tutorials on this, but this one is nicely made wink.gif
Users WebsitePM
  Top
 

 
Denva55  
Posted: Sunday, Jun 19 2011, 21:04
Quote Post


Dangerous
Group Icon
Group: Members
Joined: Dec 15, 2009

XXXXX



This thread should be sticky...... thanks

This post has been edited by Denva55 on Sunday, Jun 19 2011, 21:06
Users WebsitePMMSNYahoo
  Top
 

 
crazipayaso  
Posted: Tuesday, Aug 2 2011, 17:59
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 26, 2011

XXXXX



hey is it possible to change 00E1 to 0AB0 ???? if soo can you plz help i tired it with master spark but my game crashes when i click my selected hotkey help
PM
  Top
 

 
ZAZ  
Posted: Tuesday, Aug 2 2011, 20:11
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (crazipayaso @ Tuesday, Aug 2 2011, 17:59)
hey is it possible to change 00E1 to 0AB0 ???? if soo can you plz help i tired it with master spark but my game crashes when i click my selected hotkey help

just read the topic careful to understand the difference
Users WebsitePM
  Top
 

 
crazipayaso  
Posted: Wednesday, Aug 3 2011, 18:47
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 26, 2011

XXXXX



yes i know one is cleo other is original but is it possible to change a 00E1 hotkey to a 0AB0 hotkey? if so how plz help?
PM
  Top
 

 
ZAZ  
Posted: Wednesday, Aug 3 2011, 21:38
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (crazipayaso @ Wednesday, Aug 3 2011, 18:47)
yes i know one is cleo other is original but is it possible to change a 00E1 hotkey to a 0AB0 hotkey? if so how plz help?


basicly you can change the complete line

CODE
0AB0:   key_pressed 8// --- backspace


with

CODE
00E1:   player 0 pressed_key 15//--- enter/exit-function_key


but not 0AB0: with 00E1:


opcode 0AB0: have 1 parameter
opcode 00E1: have 2 parameter


opcode 0AB0: need to insert virtual key code numbers


opcode 00E1: need to insert specified numbers which R* had defined for controle functions
the keys for these functions are changable in game-pause-menue>options>controler settings
look to the keysetting tables:

ONFOOT CONTROLS
0 left/right -- GO_LEFT / -- GO_RIGHT
1 forward/backward -- GO_FORWARD / -- GO_BACK
2 special ctrl left/right -- VEHICLE_LOOKLEFT/ -- VEHICLE_LOOKRIGHT
3 special ctrl up/down -unknown-
4 action/secondary fire -- PED_ANSWER_PHONE/ -- PED_FIREWEAPON_ALT
5 previous weapon/zoom in -- PED_CYCLE_WEAPON_LEFT/ -- PED_SNIPER_ZOOM_IN
6 aim weapon -- PED_LOCK_TARGET
7 next weapon/zoom out -- PED_CYCLE_WEAPON_RIGHT/ -- PED_SNIPER_ZOOM_OUT
8 group CTRL forward -- GROUP_CONTROL_FWD
9 group CTRL back -- GROUP_CONTROL_BWD
10 conversation - no -- CONVERSATION_NO
11 conversation - yes -- CONVERSATION_YES
12 (does not exist) -- -- --
13 change camera -- CAMERA_CHANGE_VIEW_ALL_SITUATIONS
14 jump -- PED_JUMPING
15 enter vehicle -- VEHICLE_ENTER_EXIT
16 sprint -- PED_SPRINT
17 fire -- PED_FIREWEAPON
18 crouch -- PED_DUCK
19 look behind -- PED_LOOKBEHIND

VEHICLE CONTROLS
0 left/right -- VEHICLE_STEERLEFT/ -- VEHICLE_STEERRIGHT
1 steer back/up -- VEHICLE_STEERUP/ -- VEHICLE_STEERDOWN
2 special ctrl left/right -- VEHICLE_TURRETLEFT/ -- VEHICLE_TURRETRIGHT (NUM6)
3 special control up/down -- VEHICLE_TURRETUP/ -- VEHICLE_TURRETDOWN
4 secondary fire -- VEHICLE_FIREWEAPON_ALT
5 look left -- VEHICLE_LOOKLEFT
6 hand brake -- VEHICLE_HANDBRAKE
7 look right -- VEHICLE_LOOKRIGHT
8 next radio station -- VEHICLE_RADIO_STATION_UP
9 previous radio station -- VEHICLE_RADIO_STATION_DOWN
10 no -- CONVERSATION_NO
11 yes / trip skip -- CONVERSATION_YES
12 (does not exist) -- -- --
13 camera -- CAMERA_CHANGE_VIEW_ALL_SITUATIONS
14 brake/reserve -- VEHICLE_BRAKE
15 enter/exit -- VEHICLE_ENTER_EXIT
16 accelerate -- VEHICLE_ACCELERATE
17 fire -- VEHICLE_FIREWEAPON
18 horn -- VEHICLE_HORN
19 submission -- TOGGLE_SUBMISSIONS

This post has been edited by ZAZ on Wednesday, Aug 3 2011, 21:56
Users WebsitePM
  Top
 

 
crazipayaso  
Posted: Thursday, Aug 4 2011, 17:19
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jul 26, 2011

XXXXX



QUOTE
basicly you can change the complete line

CODE
0AB0:   key_pressed 8// --- backspace


with

CODE
00E1:   player 0 pressed_key 15//--- enter/exit-function_key


but not 0AB0: with 00E1:


opcode 0AB0: have 1 parameter
opcode 00E1: have 2 parameter


opcode 0AB0: need to insert virtual key code numbers


opcode 00E1: need to insert specified numbers which R* had defined for controle functions
the keys for these functions are changable in game-pause-menue>options>controler settings
look to the keysetting tables:

ONFOOT CONTROLS
0 left/right  -- GO_LEFT /  -- GO_RIGHT
1 forward/backward  -- GO_FORWARD /  -- GO_BACK
2 special ctrl left/right  -- VEHICLE_LOOKLEFT/ -- VEHICLE_LOOKRIGHT
3 special ctrl up/down -unknown-
4 action/secondary fire  -- PED_ANSWER_PHONE/  -- PED_FIREWEAPON_ALT
5 previous weapon/zoom in    -- PED_CYCLE_WEAPON_LEFT/  -- PED_SNIPER_ZOOM_IN
6 aim weapon  -- PED_LOCK_TARGET
7 next weapon/zoom out  -- PED_CYCLE_WEAPON_RIGHT/  -- PED_SNIPER_ZOOM_OUT
8 group CTRL forward  -- GROUP_CONTROL_FWD
9 group CTRL back  -- GROUP_CONTROL_BWD
10  conversation - no  -- CONVERSATION_NO
11  conversation - yes  -- CONVERSATION_YES
12 (does not exist) -- -- --
13 change camera  -- CAMERA_CHANGE_VIEW_ALL_SITUATIONS
14 jump  -- PED_JUMPING
15 enter vehicle  -- VEHICLE_ENTER_EXIT
16 sprint  -- PED_SPRINT
17 fire  -- PED_FIREWEAPON
18 crouch  -- PED_DUCK
19 look behind  -- PED_LOOKBEHIND

VEHICLE CONTROLS 
0 left/right  -- VEHICLE_STEERLEFT/  -- VEHICLE_STEERRIGHT
1 steer back/up  -- VEHICLE_STEERUP/  -- VEHICLE_STEERDOWN 
2 special ctrl left/right  -- VEHICLE_TURRETLEFT/  -- VEHICLE_TURRETRIGHT (NUM6)
3 special control up/down  -- VEHICLE_TURRETUP/  -- VEHICLE_TURRETDOWN
4 secondary fire  -- VEHICLE_FIREWEAPON_ALT
5 look left  -- VEHICLE_LOOKLEFT
6 hand brake  -- VEHICLE_HANDBRAKE
7 look right  -- VEHICLE_LOOKRIGHT
8 next radio station  -- VEHICLE_RADIO_STATION_UP
9 previous radio station  -- VEHICLE_RADIO_STATION_DOWN
10 no  -- CONVERSATION_NO
11 yes / trip skip  -- CONVERSATION_YES
12 (does not exist) -- -- --
13 camera                      -- CAMERA_CHANGE_VIEW_ALL_SITUATIONS
14 brake/reserve  -- VEHICLE_BRAKE
15 enter/exit  -- VEHICLE_ENTER_EXIT
16 accelerate  -- VEHICLE_ACCELERATE
17 fire  -- VEHICLE_FIREWEAPON
18 horn  -- VEHICLE_HORN
19 submission  -- TOGGLE_SUBMISSIONS


thx but i just wanted to know the basicly thx so if i had one with this two lines:
CODE
00E1:   player 0 pressed_key 4

CODE
00E1:   player 0 pressed_key 9

and this
CODE
:MSPARK_2915
0400: store_coords_to 7@ 8@ 9@ from_object 4@ with_offset 0.0 1@ 0.0
09E5: create_flash_light_at 7@ 8@ 9@ RGB_mask 255 255 255 radius 25.0
1@ += 10.0
0@ += 1
 0@ > 15
else_jump @MSPARK_2915
069B: attach_object 4@ to_actor $PLAYER_ACTOR with_offset 0.0 0.5 0.0 rotation 11@ 0.0 0.0
if or
00E1:   player 0 pressed_key 4
  not 33@ >= 750
else_jump @MSPARK_4959
if
 3@ >= 100
else_jump @MSPARK_1073
1@ = 2.0
25@ = 0.0
0@ = 1



i can change those three key press to
CODE
0AB0:   key_pressed 56



soo i want to change the firts two key press to just one 0AB0 and i want to change the other key to 0AB0 too! so all i have to do is change the lines
PM
  Top
 

 
ZAZ  
Posted: Thursday, Aug 4 2011, 18:49
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (crazipayaso @ Thursday, Aug 4 2011, 17:19)



i can change those three key press to
CODE
0AB0:   key_pressed 56



soo i want to change the firts two key press to just one 0AB0 and i want to change the other key to 0AB0 too! so all i have to do is change the lines

i don't know the context of the first two key_press and don't know what happens
make a backup of the scriptsource and then change what you want and test it
Users WebsitePM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (2) [1] 2 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG