Mission Coding for Dummies - Compile/Decompile

A Tutorial for Grand Theft Auto: San Andreas

Attention Gamer! We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Arman Ossi Loko points.
  • Post: Give Arman Ossi Loko your thoughts on this Tutorial.
  • Vote: Help Arman Ossi Loko win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.

Sound fun?

Sign up

Already a Bananite? Login

**Decompile**: What is it? Before you can edit the main.scm file, you first have to decompile. This means that it will become humanly readable, you transform the extension from .scm to .txt. You can do this in programs as MisionBuilder and SannyBuilder, but not in notepad. Once you have the txt file, you can also open it in notepad or any other text editor. This isn't very handy, because there aren't any extras in notepad (which makes it a lot more difficult). How to decompile? Because these tutorials are about SannyBuilder, I will explain it for SannyBilder. Press F5, or the icon "Decompile" or "run" > "Decompile". Go to the folder: Program Files > GTA San Andreas > Data > Script and select "main" (a .scm file). Open it. When you are doing it for the first time, you will get a screen like below. Select the folder "GTA San Andreas". Then you have to do the previous step again. Now you will get the text, which you can edit. When you save it, you will get a txt file. **Compile**: What is it? This is the opposite of decompile. When you want to test your code, you have to transform it back to the language which GTA SA can read. So you have to make it a .scm again. You can do it by pressing F6, press the icon of "compile" or by "Run" > "compile". What is the difference between compile and compile + copy? You can choose to save your txt file is at another folder on your pc than the original Data folder. Compile means that the SCM file will be created in the folder where your .txt file is saved. Compile + Copy means that the SCM file is copied into the Data folder after compilation. So the main.scm in the data folder will be replaced. There is no difference when you are editing the main.txt that is located in the "data" folder itself. SannyBuilder, Colours In SannyBuilder are some words marked: ![](http://img8.imageshack.us/img8/10/colorsuen.jpg "") Black: these are often used commands, like jump, wait, create_thread, fade, repeat, jf, etcetera. You don't have to put the code before it. Green: these are labels, for example ":label" or "@label". Blue: the variables have a blue colour. Red: names of for example objects, texts and threads are red. Yellow and blue: Yellow is the "object", the blue is what is said about the object. It is difficult to explain, but when you look at it, I'm sure you will understand it. Brown: names of the models. Blue/Grey (light): this are comments, they are not read by the game and are handy as a note. They are proceeded with //. **Functions**: There are a few functions in SannyBuilder, which are very handy to use. Of course there are more functions, but these are the most important ones. Coords manager. You can find it in Tools > Ide Tools > Coords Manager (hot key: CTRL+ALT+1). You can find the X, Y and Z coordinate of the place where you are in San Andreas. You can also find your angle. You can't use this when SA isn't running of course. Opcode search. You can find it: Tools > Ide Tools > Opcode Search (hot key: CTRL+ALT+2). With this tool you can find opcodes very easily. F1 key: when you typ a little part of a command, sannybuilder will try to find a command as it was used in the original main.scm. SCM documentation. You can find it under the help-menu (hot key: F12). You will find a usefull database. You can find here for example the icon-numbers. Start SA: you can start SA by pressing F8 or the icon "Run San Andreas". Missionbuilder > Sannybuilder converter: it doesn't work perfect, but you can find it under Tools-menu > Code Converter > MB -> SB.


None found


Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share


Original Authors


Arman Ossi Loko avatar
Arman Ossi Loko avatar Lurkin'
Admin Joined 10y
71,925 points Ranked 56th
63 medals 9 legendary 16 rare
  • GTAV First Adopter Medal icon
  • Submitted 15 Tools Medal icon
  • Submitted 30 Tutorials Medal icon
  • 1st place - 2015 Uberstyles Contest Medal icon
  • Achieved Admin clearance Medal icon
  • 15+ Entries! GameBanana’s Christmas Giveaway 2015 Medal icon

Arman Ossi Loko avatar
Arman Ossi Loko
KOPASSUS Incorporated Flag
KOPASSUS Incorporated

Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!



Difficulty Level
Beginner Difficulty



Date Added
Date Modified
bcp.crwdcntrl.net tracking pixel