The Game Modding Community - Since 2001

Mission Coding for Dummies - Compile/Decompile

A Tutorial for Grand Theft Auto: San Andreas

**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: ![]( "") 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


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


Original Authors


Arman Ossi Loko avatar
Arman Ossi Loko username pic Joined 11y ago
65,381 points Ranked 57th
65 medals 11 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



  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+


  • 0 Posts
  • 6y Submitted
  • 4y Modified


  • Not yet rated
Sign up to access this!

SEX! Ok, we got your attention. Mascot

GameBanana is one of the oldest mod sites on the net. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation - send modders points.
  • Post: Give modders your thoughts on their work.
  • Vote: Help your favorite modders win monthly awards.
  • Rate: Rate mods and help them stand out.
  • Flag: Alert moderators and warn members of problems with mods.
  • Watch: Get notified when mods are updated.

Interested? Sign up now!

Already a Bananite? Login tracking pixel