*Coming soon - Please dont remove*
S C M - T u t o r i a l sby J-Fox
Before StartingWhat is SCM?SCM is the Mission Scripting engine made by R* for GTA3. Its almost the same in VC and SA. The only thing which changed is the opcode range/function. An opcode is an number pointing to a function in GTA.
0001: Wait 100 ms
In this case the 0001 is the Opcode. 100 is the time the game waits until the next opcode gets executed. Values which are needed for an opcode (called params/parameter) can be either float, integer or variable.
Float: 123.45
Integer: 123
Variable (Global): $Variable
Variable (Local): @0 - @16
(Local stuff will be shown later)
so basicly:
0001: Wait 123 ms
equals to
0004: $Wait = 123
0001: Wait $Wait ms
because the $Wait is defined as 123!
There are more than 1000 opcodes! They can be found on 2 pages:
http://vc-db.webtools4you.net/ < VC
http://sa-db.webtools4you.net/ < SA
Alot of them can be found on gtaforums.com as well but the database is more handy in my opinion.
Ok this have been the really basic description of SCM
The editor works like this:
$ - Global
@ - Local
: - Sub/Label
;; - Comment
テつ」テつ」 - Global jump
テつ」 - Local jump
i allready shew you how to use the global variables. the others are working like this
:LOOP
0001: wait 10 ms
;; My Text! This is ignored by the editor. The following too
;; 0001: wait 1337 ms
0002: jump テつ」テつ」LOOP
The editor is kewl and helps you alot finding opcodes. So when typing:
wait
in a empty line and you press F1 while the word is marked it will change to the first keyword found which will be
0001: wait 1000 ms
Also the editor isnt looking at the text in normal code lines with opcodes. So:
0001: wait 1000 ms
equals to
0001: 1000
or
0001: set_player_health 1000
because the builder is only looking on the params (1000) and the opcode (0001)
However: Opcode 0001 (which leads to the wait function) requires one parameter only and the type MUST be integer. So this one wont work:
0001: set_player_health 1000.0
same as:
0001: wait 1000.0
Maybe it isnt crashing but sometimes the value is used wrong by the game so it will cause into lag or fatal errors
What you will need- GTA: San Andreas - V1.0
- BW SA-Mission builder 0.3 - Download
Setting up the mission builderExtract the mission builder and open the SASCM.ini using notepad. At the bottom simply add this text:
0A4A=2,%1h% %2h%
0A4B=0,
Now save and close the file.
To make SA Builder fully functional now Copy the following files to the mission builder directory:
data/default.ide
data/peds.ide
data/vehicles.ide
so the 3 files are in the same directory as the SABuilder033.exe
Markup ScriptLESSON 1:
The Basics*Coming soon*
LESSON 2:
Adding more checks*Coming soon*
LESSON 3:
The best markup script in the world*Coming soon*
The final codeKnown bugs:
- Can be used to exploit the game when getting caught or wasted..
- Respawn still needs to be improved - Use current car instead new one
- Tuning states arent safed yet
;; Markup Script:
:Markup_Initialize
0004: $Markup_ID = -1 ;; integer values
:Markup
0001: wait 50 ms
:Markup_Get
00D6: if 0
00E1: key pressed 0 11
004D: jump_if_false テつ」テつ」Markup_Set
018C: play sound 1056 at 0.0 0.0 0.0
00D6: if 0
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false テつ」テつ」Markup_Get_Foot
:Markup_Get_Car
03C0: $Markup_Player = actor $PLAYER_ACTOR car
0441: $Markup_ID = car $Markup_Player model
00AA: store car $Markup_Player position to $Markup_X $Markup_Y $Markup_Z
0174: $Markup_A = car $Markup_Player z_angle
0001: wait 100 ms
0002: jump テつ」テつ」Markup_Set
:Markup_Get_Foot
0004: $Markup_ID = 0 ;; integer values
00A0: store actor $PLAYER_ACTOR position to $Markup_X $Markup_Y $Markup_Z
000D: $Markup_Z -= .981 ;; floating-point values
0172: $Markup_A = actor $PLAYER_ACTOR z_angle
0001: wait 100 ms
:Markup_Set
00D6: if 1
00E1: key pressed 0 10
8038: NOT $Markup_ID == -1 ;; integer values
004D: jump_if_false テつ」テつ」Markup
018C: play sound 1056 at 0.0 0.0 0.0
00D6: if 0
8038: NOT $Markup_ID == 0 ;; integer values
004D: jump_if_false テつ」テつ」Markup_Set_Foot
016A: fade 0 () 100 ms
0001: wait 100 ms
00D6: if 0
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false テつ」テつ」Markup_Set_Car
0362: remove actor $PLAYER_ACTOR from car and place at $Markup_X $Markup_Y 1000.0
:Markup_Remove
0001: wait 50 ms
00D6: if 0
80DF: NOT actor $PLAYER_ACTOR driving
004D: jump_if_false テつ」テつ」Markup_Remove
:Markup_Create_Car
00A6: destroy car $Markup_Car
00D6: if 0
8248: NOT model $Markup_ID available
004D: jump_if_false テつ」テつ」Markup_Teleport
0247: request model $Markup_ID
038B: load requested models
:Markup_Teleport
00A5: $Markup_Car = create_car $Markup_ID at $Markup_X $Markup_Y $Markup_Z
0249: release model $Markup_ID
:Markup_Set_Car
036A: put actor $PLAYER_ACTOR in car $Markup_Car
00AB: put car $Markup_Car at $Markup_X $Markup_Y $Markup_Z
0175: set_car $Markup_Car z_angle_to $Markup_A
0229: set car $Markup_Car color to $Markup_Color_A $Markup_Color_B
02EB: restore camera with jumpcut
016A: fade 1 () 100 ms
0001: wait 100 ms
0002: jump テつ」テつ」Markup
:Markup_Set_Foot
016A: fade 0 () 100 ms
0001: wait 100 ms
00D6: if 0
00DF: actor $PLAYER_ACTOR driving
004D: jump_if_false テつ」テつ」Markup_Set_Foot_Fixed
0622: AS unknown remove actor $PLAYER_ACTOR from car $Markup_Car
0362: remove actor $PLAYER_ACTOR from car and place at $Markup_X $Markup_Y 1000.0
:Markup_Set_Foot_Fixed
00A1: put_actor $PLAYER_ACTOR at $Markup_X $Markup_Y $Markup_Z
0173: set_actor $PLAYER_ACTOR z_angle_to $Markup_A
02EB: restore camera with jumpcut
016A: fade 1 () 100 ms
0001: wait 100 ms
0002: jump テつ」テつ」Markup