GTA SAN ANDREAS
MODS for


The Editor Functions
- 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-Directive, will be compiled to Name.CS
{$CLEO .cm} = Cleo-Directive, will be compiled to Name.CM
- Useful tools:
- Choose TOOLS on menue, then IDE Tools >> Coords Manager
to read the x,y,z coordinate and the z-angle of the current player position if the game is running - Choose TOOLS on menue, then IDE Tools >> Opcode Search
-
to search for opcodes
type any keyword to find a codeline which include this word
or type an opcode to find the description
the foundings are allways existing lines of original main.scm
The opcode search tool requires to create the opcode.txt in Sanny Builder 3\data\sa folder
Load the decompiled original main into sannybuilder
then choose TOOLS on sanny menue, then: make opcodes.txt - download my opcodes.txt and put it in Sannybuilder installation directory\data\sa
- then you have everything for your opcode search
- Line numbers:
in option menu EDITOR you can find the feature to switch Line numbers off/on
The line number is part of the editor, not of the script - HighLighter: in option menu HighLighter you can find the feature to switch Line numbers off/on
Ermöglicht Anzeigeeinstellungen allows to show different script entries in different kinds (coloring, big, coursiv) - Conditions check:
this option in menu General should allways be enabled
checks while compiling process if the conditional checks of your script have failures - Write opcodes: in option menu GENERAL you can find the feature to switch between 2 ways for decompiling
- either decompile by writing opcodes
- or decompiling without opcodes
- 1. Writing Opcodes
- All entries are shown with their opcodes
The opcodes are the real programm codes of the script functions - 2. Without Opcodes
- The script is more slim, maybe more clear (but not for me)
especially 004D: jump_if_false will be now jf
But not all opcodes are disappeared. Many codes must be used furthermore by applying their opcodes. - By compiling it doesnt matter if you use codes with
opcodes or without opcodes
You can merge everything and sanny compile it as well,
provided that the code is correct and codelines which includes opcodes by decompiling without opcodes
must be used furthermore by using opcodes - A special feature by decompiling without opcodes is to translate opcode based commands into
- Classes and Keywords
- For a couple of codes can be used CLASSES
Read more about classes in Sannybuilder-HELP theme: Coding >> Classes - or at Keywords and Classes
- This code by decompiling with writing opcodes:
00AB: put_car 22@ at -1577.942 52.6333 40.0
will by shown by decompiling with without opcodes in this kind:
Car.PutAt(22@, -1577.942, 52.6333, 40.0)
the meaning of the code is defined by the class entries,
Car = class name
PutAt = class member
name and member are combined with a dot in the middle
22@ = class owner
class owner and parameters are placed in brackets and separated with comma
(parameter = needed information for the command)
Options
Choose TOOLS, then options
Option: different view of the decompiled code
Script with opcodes:
:CARSL_6439
00D6: if
00E1: player 0 pressed_key 16
004D: jump_if_false @CARSL_6535
010B: 5@ = player $PLAYER_CHAR money
00D6: if
002D: 5@ >= 14@ // (int)
004D: jump_if_false @CARSL_6512
0012: 14@ *= -1
0109: player $PLAYER_CHAR money += 14@
0002: jump @CARSL_6700
Script without opcodes::
:CARSL_6439
if
00E1: player 0 pressed_key 16
jf @CARSL_6535
5@ = Player.Money($PLAYER_CHAR)
if
002D: 5@ >= 14@ // (int)
jf @CARSL_6512
14@ *= -1
Player.Money($PLAYER_CHAR) += 14@
jump @CARSL_6700

Sannybuilder - HELP
- Choose HELP on menue, then Content to find informations,
such like key_press numbers, weapon numbers, bodyparts etc.. - The explanation of the 0AB0: key numbers is documented in Sannybuilder HELP: CLEO 3 Code Library >> Virtual key codes (for 0AB0)
You will find then 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
-
CharacterDecimalHexBackspace88Z or z905A
- Its easier to use decimal version. Just insert the number which is shown
To use hex version needs to write 0x; exemple: key K = 0x4B - a key_press check for "Backspace" looks like below:
-
if 0AB0: key_pressed 8 004D: jump_if_false @next
- First Steps in Cleo Scripting with Sannybuilder
- Placing Cars by Using Parked_Car_Generator and Weapon Pickups
- The Editor Functions
- HELP
- Reading Coordinates of player poisition
- The Opcode
- DATA TYPE MEANING
- Special Particularities in Cleo
- mission script template
- Scripting/Writing a Thread - coding praxis - conditional checks
- Screenshot
- Slowmotion
- First Person Camera
INDEX
Example Scripts