Version 7.5 gives you the ability to generate CLEO scripts! The principle of scripting and the main features do not differ from the main branch of the generator. But in this mode there are some features that are worth mentioning.

Connection and configuration is described in the Installing and setting. Compiling Scripts section. Compilation of scripts. The main difference is in this setting: we need to connect the libraries GTA.III.CLEO, GTA.VC.CLEO or GTA.SA.CLEO. Also, here you need to specify the folder with the game, since the SetMainSCMFolder method is not available:

namespace demo_app {
class Program {
static void Main( string[] args ) {
// Where to save FXT files?
Generator.SetFXTFolder( @"D:\Programm\GTA_SA Career v2.0\modloader\wmysterio\cleo\cleo_text" );
// For CLEO, you must use the path to the game!
Generator.SetGTAFolder( @"D:\Programm\GTA_SA" );
// Path to "sanny.exe"
Generator.SetSannyBuidlerFolder( @"D:\Programm\Sanny Builder 3" );
Generator.Compile<MAIN>( false );

Between < and > is a type that inherits Thread, Mission, or MissionCustom. To create a CLEO thread, we just need this code:

public class MAIN : Thread {
public override void START( LabelJump label ) {

We see that there are no differences in the code compared to the MAIN.scm threads. The end_thread command will be replaced with the 0A93 opcode: end_custom_thread. The same manipulations will be with other commands that are used only in CLEO.

Pay attention to the class name. The generator will use it as the filename. There are no special restrictions on the name, but I recommend using uppercase characters in the class name.

By default, the script is compiled with the CS or CM extension in the GAME\CLEO folder. If you need to change these properties, then the attribute system is used here:

[Extension( "H" )]
public class MAIN : Thread {
public override void START( LabelJump label ) {

There are 3 such attributes in total; You can only use the ones you need, ignoring the rest.

The code above will save the script at this path: GAME\CLEO\NEW_DIR\MAIN.H.

Make sure the path contains all the folders you need on your hard drive!

The EnableThreadSaving attribute implements opcode 0A95, but without explicitly calling it. This attribute, like Extension, does not apply to missions and will be ignored.

Compiling multiple scripts

If there is a need to compile a whole bunch of scripts, then we just need to call the Compile method several times:


Note that if you use the command


then the SCRIPT_NAME thread will be included in the final assembly and compiled on its own along with the original script!