Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Dutchy3010

SCM Coding FAQ

Recommended Posts

Forkhead

i have a problem with sanny builder. when i trying to open my main.scm, it says: unknown opcode 4156 at offset 52364. what must i do?

Share this post


Link to post
Share on other sites
BnB

Try IGNORE_UNKNOWN. You should not post that here!

Share this post


Link to post
Share on other sites
Forkhead
Try IGNORE_UNKNOWN. You should not post that here!

i runned the sanny with parameter \debug=2 and it worked.

Share this post


Link to post
Share on other sites
TheSiggi

fixxing CLEO3

 

 

This is a instruction on how to install CLEO 3 correctly.

 

first of all, this is the default content of your GTA SA folder:

 

 

 

http://img843.imageshack.us/i/grandtheftautosanandreaf.jpg

Step 1

 

Downlaod CLEO 3Libary

 

auto installer

 

archive

Step 2 - installing

Now either run the installer or unzip the content of the archive into your GTA: San Andreas directory:

 

http://img844.imageshack.us/f/contentithcleo.jpg

 

if any of these files is missing repeat step 2

 

this shows you the function of the new components:

 

http://img828.imageshack.us/i/markedcontent.jpg

 

now if you run San Andreas you should see this:

 

http://img827.imageshack.us/i/menutext.jpg

in the lower left corner of the pause menu (in this case 29 scripts are loaded)

 

if you don't see any water mark like this repeat step 2 - installing

 

if the game chrashes after oading a savegame make sure our exe is ompatible with CLEO or simply download the compact exe

Pass word is CVehicle

(Note! C and V have to be in caps)

 

just put the exe into your Grand theft Auto: San Andreas folder and replace the exe you got in there

 

now CLEO should run properly, if not make sure you followed all these Steps and retry

 

cheers smile.gif

 

Edited by The_Siggi

Share this post


Link to post
Share on other sites
BnB

Good work Siggi that will help lot of people and you should make one for cleo 4

Share this post


Link to post
Share on other sites
Indi

Someone answer me this...

 

Is R*'s programming language actually SCM? Or was it a different language entirely when they were making the III era GTAs.

 

If it is SCM that they made their games with, do any other game companies use the language? Or is it just R* that uses it?

 

and... where are the origins of it?

Share this post


Link to post
Share on other sites
BnB

Have a look here

Edited by BnB

Share this post


Link to post
Share on other sites
sci4me

nice!!!

Share this post


Link to post
Share on other sites
GoRy_CZ

Wow Good Work Dutchy smile.gif

Share this post


Link to post
Share on other sites
kmlwin.1996

I have many many questions. smile.gif

 

How to put missions into scm?

 

What is stripped.scm?

 

How to make a mission with MPACK?

 

I'll ask many questions later. PLZ reply me!!

 

smile.gif

 

 

Share this post


Link to post
Share on other sites
BnB
What is stripped.scm?

Actually its a stripped main.scm it includes only the very basics (no missions, no external scripts, or other threads, etc.) It's useful for Total Conversion Mods.

Share this post


Link to post
Share on other sites
LikeBAX

I need main.scm with all SA 100% facilities for my script mod, without missions and without: girlfriends, property and bonuses - Hydra and Rhino at Grove Street. Can someone tell what should I delete in original main.scm?

And I have found this needed opcode in original main.scm:

if

$MISSION_BADLANDS_PASSED == 1

It is about passing Badlands missions. If the missions are passed, other missions will be available. How can I make this for my missions? how the game will understand this code if for example I will write $MISSION_REECE_PASSED == 1 Do I need a label called REECE?

 

Del, problem solved.

Edited by MC Vic

Share this post


Link to post
Share on other sites
User_Fox

Hey, I've got a little problem:

I cant use coord manager in Sanny Builder or it was disabled? Do I have to play GTA in-game to enable it first?

Share this post


Link to post
Share on other sites
Adler
Do I have to play GTA in-game to enable it first?

Yes.

Share this post


Link to post
Share on other sites
ItsAllAboutGTA

Hey,is it possible to make a Laucher for GTA III ? i mean like GTA IV,when you start up your GTA IV,a Rockstar Social Club launcher will pop up for you to log in to SocialClub or play offline.is it possible to make that kind of launcher for GTA III ?

Share this post


Link to post
Share on other sites
coltonon

Hey, i'm modifying somebody's cleo script. The problem with their script is that it only works with one vehicle. I have never done any sort of cleo scripting, so I'm not an expert in this stuff. I want the script to work for all vehicles, so I modified it. This is the line that I have to mod: Actor.DrivingVehicleType($PLAYER_ACTOR, #BULLET) It works if I change Bullet to any other vehicle, but is there a way I can make ALL vehicles work with this instead of just one? The cleo script tutorial here does not go very deep into the # data type. I know I can make a whole new cleo script for every single vehicle, as I am currently doing, but can I make it select all vehicles? And I don't want a thousand .cs files in my directory either for every single vehicle. Hope someone can help. If not, i'll just guess check and revise smile.gif

Share this post


Link to post
Share on other sites
TheGodfather.

Just change it into the condition: 00DF: actor $PLAYER_ACTOR driving

 

Share this post


Link to post
Share on other sites
coltonon

O. Sorry for being a moron, this is the first time I've modded a Script of some sort.

Share this post


Link to post
Share on other sites
fastman92

 

Hey,is it possible to make a Laucher for GTA III ? i mean like GTA IV,when you start up your GTA IV,a Rockstar Social Club launcher will pop up for you to log in to SocialClub or play offline.is it possible to make that kind of launcher for GTA III ?

Sure, but you need to learn how to make a GUI, drawn interface and finally make a program in some of languages (C++ / C++ / Delphi / sth else).

 

On interface there should be START button, this would simply do WinExec of gtaiii.exe

 

 

Hey, i'm modifying somebody's cleo script. The problem with their script is that it only works with one vehicle. I have never done any sort of cleo scripting, so I'm not an expert in this stuff. I want the script to work for all vehicles, so I modified it. This is the line that I have to mod: Actor.DrivingVehicleType($PLAYER_ACTOR, #BULLET) It works if I change Bullet to any other vehicle, but is there a way I can make ALL vehicles work with this instead of just one? The cleo script tutorial here does not go very deep into the # data type. I know I can make a whole new cleo script for every single vehicle, as I am currently doing, but can I make it select all vehicles? And I don't want a thousand .cs files in my directory either for every single vehicle. Hope someone can help. If not, i'll just guess check and revise

Did you ever think of removing unwanted condition?

 

If condition is used, but you don't want it, then remove it.

Edited by fastman92

Share this post


Link to post
Share on other sites
gcapel
SCM Coding FAQ

Frequently Asked Questions

 

General

 

I want to learn coding, what do I have to do?

First notice that you don't learn coding within 24 hours, you have to put time and effort in it. There are several tutorials which can help you learning coding, best tutorial is the Coding Bible (Part I and Part II).

 

I want to make my own missions, how can I do that?

If you want to do it by coding, so not using other mods (like Design Your Own Mission), you can try this tutorial.

 

Who wants to code my ideas?

First, there is a thread for this kind of topics. You can find it here. But don't have high hopes, because most likely your idea won't be coded, because it takes a lot of time to make a scm script. When you desperately want something to be coded, I advise you to learn coding yourself.

 

What is CLEO?

CLEO contains several things:

  • Custom scripts: with these scripts the user doesn't have to start new game.
  • New opcodes
  • Plugins
More about CLEO

CLEO Tutorial

 

I want to have two .scm mods at the same time!

Most likely, this is not easy. You can use them seperate by using MPACK. More then one CLEO-script is possible, but only if they don't have a conflict.

 

Which software do I need to edit the main.scm?

There are two major programs for this: SannyBuilder and Mission Builder.

 

Can I use SCM coding for GTA IV modding?

No, it is a different language. However, you can use the knowledge of scm, because the III-era opcodes look a lot like the functions in IV scripting.

 

No, but you CAN use the knowledge of how mission scripts are put together and what most of the opcodes do (save a few extra parameters here and there) to help in creating scripts for IV

 

 

SannyBuilder errors

 

I'm getting an error in SannyBuilder: not enough actual parameters!

There are too few parameters in this opcode. Look at an example of the opcode, so you can compare it. Also check if there nee to be commas or not, this is a common mistake. For example:

 

0100:   actor $PLAYER_ACTOR in_sphere 1793.068, -1904.254, 12.3989 radius 4.0 4.0 4.0 sphere 1 in_car 

 

This is wrong, because the commas should not be in there.

 

Compiler error: "Label 'loop' redeclared."

This means that you are jumping to a label whose name is twice used in the code.

 

Compiler error: "Incorrect number of conditions, 9 max".

Most likely you will have a loop which contains only one condition, but you said "if or". For example:

 

:MODEL_LOADif or8248: not model #NRG500 availableelse_jump @MODEL_LOAD

 

 

I have another error, what do I have to do?

Use the SannyBuilder explanations: select help when you get the error.

 

Animation

 

 

Ingame errors

 

The game freezes, I can't do anything with my PC!

This is a very frequent bug: you forgot a wait somewhere in your code. Any loop in your code should at least 1 wait opcode. I will advise you to play SA in a window, then you can stop it with CTRL-ALT-DELETE.

Another solution is to run this program: http://tjbp.net/upload/GTA_SA_Killer.zip. Simply press F7 and gta_sa.exe is killed.

 

Help! My game crashes!

Sadlye, there isn't a clear answer for this, but you can do something. First, you have to see when it crashes. When the game starts? When there is a condition true? This way you can exclude parts of the code, so looking for the mistake will be easier. Then, when you know which part causes the crash, you have to eliminate possible wrong opcodes. Just put // before it, and test again. If the game doesn't crash, you know which opcode contains the fault. Then you have to find out what is wrong about this opcode. There is also an CLEO add-on (SCMLOG.cleo), which logs the opcodes, so you can see which opcode was the last one before the crash.

When you don't find the problem, you can post it this forum. Be sure you are doing the following things:

1. Make a topictitle which refer to your problem.

2. Describe what the fault is.

3. Post your code, and mark which code is causing the problem. Otherwise people aren't willing to check your code.

4. Add scmlog.log to the post.

5. Give all possible information about the script/problem.

 

Nothing happens ingame!

This surely is too little information. This could happen when you forgot to compile, this can also happen because your code is stuck in a loop, due to some coding mistake.

 

 

Coding

 

I can't find an opcode...

Use the opcode search tool (Tools > Ide tools > Opcode search or CTRL+ALT+2), or typ a word/opcode in SannyBuilder and press (repeatedly) F1.

 

What is the difference between Player_Char and player_Actor?

$Player_Char: Used with opcodes that you can only use for the player (like 0109: player $PLAYER_CHAR money += 1000000)

$Player_Actor: Used with opcodes that you can use for all actors (like 00A1: put_actor $PLAYER_ACTOR at 345.5621 306.2212 998.4484)

 

Is there a difference between editing the main.scm of SA and VC?

Yes there are many things added in SA, like external scripts and some opcodes and constructs.

 

Where can I find the object ID's?

You can use Mapviewer or MapEditor for that.

If you know the model name, you can find the object by using CTRL+ALT+H in SannyBuilder. You can also take a look at this site

 

Where can I find the model-names of pedestrians, weapons and vehicles?

For pedestrians you can use Ped Editor. For pictures of all peds you can look here.

For Vice City you can look here.

 

For weapons you can look in the help-files of SannyBuilder (SCM Documentation > GTA SA > Weapon Numbers).

 

For vehicles you can open vehicles.ide, located in the data folder (Program Files\Rockstar Games\GTA San Andreas\Data), or take a look at this site. It is also possible to use this tool.

 

Why isn't my FXT text showing up?

Either you named it too long or you could have had two spaces between the second part of the line instead of one or you have a space at the end

 

GXT editor to edit american.gxt

I use Hammers SAgxtEditor. Version 1.3 was the latest and cant be found on famous download pages. Its still available at thegtaplace.

 

All gxt name entries are numbers by default. It needs to inject an ini-file to inject the entrynames. Hammer posted one but its disappeared. Get the ini here: http://zazmahall.de/ZAZGTASANATORIUM/zazmo...merican_ini.zip

 

Then click on search icon (field glas) and choose "String List Match", a window opens. click on Open, change in open screen the file extension to "ALL FILES *.*" Open then american.ini, confirm with OK. But it injects not all, only the half. But you can also inject it manual. Maybe you found IE10 in main.scm. Sso use search function(click on field glasses) of gxtEditor and search for IE10. You will find the injected entry and the text for displaying also.

 

Note: there are 2 different search functions:

"Find Name" means: search for exact entry of main.scm or exe like fem_ok

"Find Value" means: search for any word of the text

 

Important: if you have changed text so click first on an other entry before you save the file

 

In addition there was made a complete translation of american.gxt as textfile from AleX AciD.

Dont know where it can be downloadable

I uploade it at rapidshare:

http://rapidshare.com/files/198843515/Kopi...A_text.txt.html

 

GXT texts for all supported games can be found in the Sanny Builder\help\GXT Strings folder.

 

How can I get coord ingame?

You can use this tool or the coords tool in Sanny Builder.

 

How can I change the keys used in a mod?

Take a look at this topic.

 

CLEO

(written by James227uk)

 

Game crashes when opening gta_sa.exe

This is related to your EXE being incompatible. Download this EXE:

 

http://public.sannybuilder.com/gtasa_exe_idb/compact.rar

 

Password to archive is CVehicle

 

(Note: C and V MUST be in caps)

 

Game crashes on loading bar

One of your scripts is not working when the game loads. Try deleting the script you most recently added. If it still crashes remove all your scripts and try the game. If it still crashes it's not the scripts that's the problem. You've modded another file and that is causing the crash. If it doesn't crash now, try adding each of your scripts back one by one. When the game crashes, remove the script you just added.

 

Game crashes when pressing appropriate key

The script you have added is causing the crash. Something is wrong with the script code after the keypress. Consider telling the script author in the topic or by PM if possible.

 

Game crashes when in an area

There are 2 reasons for this. Either something is wrong with the script, or there is something sort of conflict between this script and another. Try removing all but this script and see if it still crashes. If it doesn't, there is a conflict. If it does consider writing to the mod author

 

 

 

Corrections and additions are appreciated.

 

Thanks to:

  • PatrickW
  • Seemann
  • ZAZ
  • goin-god
  • james227uk
  • ceedj
Last update:

I have not enough parameters here! can someone fix this:

 

0007: @4 = @0 000F: @4 -= 2.0 000B: @0 += 2.0 0007: @5 = @1 000F: @5 -= 2.0 000B: @1 += 2.0     :Stinger_loop       0001: wait  250 ms 0007: @6 = -1 053E: @6 = get_random_car_with_actors -1 in_area @4 @5 @0 @1   00D6: if 0 8039:   NOT   @6 ==  -1;; integer values 004D: jump_if_false ££Stinger_timer       04FE: deflate_tire  0 on_car @6 04FE: deflate_tire  1 on_car @6 04FE: deflate_tire  2 on_car @6 04FE: deflate_tire  3 on_car @6  :Stinger_timer 00D6: if 0 0019:   @32 > 10000 004D: jump_if_false ££Stinger_loop     0249: release_model #TEMP_STINGER2 0108: destroy object @7 004E: end_thread  :stinger_sniff_thread 03A4: name thread "ST_SNIF"  :stinger_sniff_loop 0001: wait  100 ms 00D6: if 0 0256:   player $PLAYER_CHAR defined 004D: jump_if_false ££stinger_sniff_loop   00D6: if 1 00E1:   key pressed  0  17   00DD:   actor $PLAYER_ACTOR driving_vehicle_type #BROADWAY 004D: jump_if_false ££stinger_sniff_loop     03C0: @10 = actor $PLAYER_ACTOR car 0407: create coordinate @0 @1 @2 from car @10 offset  0.0 -2.5  1.0 0174: @3 = car @10 z_angle 0009: @3 +=  90.0;; floating-point values 02CE: @2 = ground z @0 @1 @2 000B: @2 += 0.1 004F: create thread ££Stinger_thread  @0 @1 @2 @3 0001: wait  500 ms 0002: jump ££stinger_sniff_loop

 

Share this post


Link to post
Share on other sites
Nuel-Luke

may i ask ?

how to set current day to start some script ?

Share this post


Link to post
Share on other sites
crashoverride93

What works for me, is when my game freezes, I simply press ctrl + alt + delete and then just end the gta sa process through task manager.

. Sometimes That works sometimes it totally freezes the pc

Share this post


Link to post
Share on other sites
SMACKED!

May I ask? Correct me if this is posted here wrongly.

 

What is "gosub"? I'm learning to code, i'm a newbie one.

Share this post


Link to post
Share on other sites
ZAZ

Yes, it's the wrong place. You can open a topic in the coding forum for your question or ask in CLEO Script Tutorial, but i try to explain it here
0050: gosub @Label
short description: Executes the code at the specified label until 0051: return is encountered

Long description: Gosub lead the code to a "subscript", means codes that are excluded from your main script
The "subscript" must end with 0051: return and also only a "subscript" may end with 0051: return
As soon as the "subscript" ended by return, then the reading process continue with the codes of the main script, with the next code after the gosub command
Below a cleo script for San andreas as example

{$CLEO .cs}:Text_Draw_Gosubthread 'TXGOSUB'wait 1000while true    wait 0    03F0: enable_text_draw 1    gosub @Text_Format_1    045A: text_draw_1number  450.0 150.0 'BB_15' [email protected]    // value    gosub @Text_Format_shadow    033E: set_draw_text_position 602.0 332.0 GXT 'INFERNU'    gosub @Text_Format_2    033E: set_draw_text_position 602.0 332.0 GXT 'INFERNU'        end:Text_Format_10349: set_text_draw_font 20340: set_text_draw_RGBA 102 153 255 255 033F: set_text_draw_letter_size 0.8 2.5 0343: set_text_draw_linewidth 640.003E4: enable_text_draw_align_right [email protected] += 1return:Text_Format_shadow033F: set_text_draw_letter_size 0.88 3.8 0340: set_text_draw_RGBA 0 0 0 255 0349: set_text_draw_font 0 03E4: set_text_draw_align_right 1return:Text_Format_2033F: set_text_draw_letter_size 0.86 3.3 060D: draw_text_shadow 2 rgba 0 0 0 255 0340: set_text_draw_RGBA 153 102 51 255 0349: set_text_draw_font 0 03E4: set_text_draw_align_right 1return

The used variables of the "subscript" are working in same scope as the main script

The gosub method is a way to exlude a lot of codes and keep the overview to your main script,
but thats not all.
Used in main.scm it becomes a bigger meaning
The main part of the main.scm is a collection of scripts and each script (thread) can lead to one and the same "subscript"
so, for example can you find a lot of leads to LITCAS_267
0050: gosub @LITCAS_267
for doing a fade

:LITCAS_2670169: set_fade_color_RGB 0 0 0 016A: fade 0 time 500 :LITCAS_28200D6: if 016B:   fading 004D: jump_if_false @LITCAS_306 0001: wait 0 ms 0002: jump @LITCAS_282 :LITCAS_3060051: return

And for mission scripts it becomes again a bigger meaning because the mission scripts are running in "subscripts" and work then in this case in a special mode.

 

At last i need to say that a new cleo code that comes with the cleo plugin works like an "advanced gosub"

i'm talking about 0AB1: call_scm_function

The "subscript" of that method have it's own scope

Share this post


Link to post
Share on other sites
SMACKED!

For what does else actually works?

Share this post


Link to post
Share on other sites
ZAZ

For what does else actually works?

same meaning like "otherwise"

it's part of a conditional check by using high level languge

it allows to give additional or alternatively instructions in case if the main conditions can't be passed

 

example1: are you mad or ill? if not, then ask the oracle

 

example2, with additional condition: are you mad or ill? if not, what else could be your problem?

 

test the script below, then decompile it

{$CLEO .cs}thread 'else'while true    wait 0    if        0AB0:   key_pressed 8// 	press backspace key    then        00BA: text_styled 'fem_ok'  2000 ms  4//ok           else        00BA: text_styled 'fem_off'  2000 ms  4//off    endend

Share this post


Link to post
Share on other sites
SMACKED!

 

For what does else actually works?

same meaning like "otherwise"

it's part of a conditional check by using high level languge

it allows to give additional or alternatively instructions in case if the main conditions can't be passed

 

example1: are you mad or ill? if not, then ask the oracle

 

example2, with additional condition: are you mad or ill? if not, what else could be your problem?

 

test the script below, then decompile it

{$CLEO .cs}thread 'else'while true    wait 0    if        0AB0:   key_pressed 8// 	press backspace key    then        00BA: text_styled 'fem_ok'  2000 ms  4//ok           else        00BA: text_styled 'fem_off'  2000 ms  4//off    endend

I don't have words to describe my love towards you.

Share this post


Link to post
Share on other sites
_Æ_

-

Edited by _Æ_

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.