Difference between revisions of "Streamed Script"

From GTAMods Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
An '''external script''' is a script file that is outside the main script file, the <code>main.scm</code>. External scripts are located in the <code>script.img</code> in the <code>data/maps</code> folder. The maximum number of external scripts that can be defined is 82. The maximum number of external scripts that can be used simultaneously is 70.
+
An '''external script''' is a script file used only in San Andreas that is outside the main script file, the <code>main.scm</code>. External scripts are located in the <code>script.img</code> file in the <code>data/maps</code> folder. The file is usually decompiled along with the <code>main.scm</code>. The maximum number of external scripts that can be defined is 82. The maximum number of external scripts that can be used simultaneously is 70. The game currently has 78 defined external scripts.
  
 
==How 2.0==
 
==How 2.0==
Line 164: Line 164:
 
| 33
 
| 33
 
| TRAINS
 
| TRAINS
|  
+
| Being a passenger in the train
 
|-
 
|-
 
| 34
 
| 34
 
| ZERO_AMBIENCE
 
| ZERO_AMBIENCE
|  
+
| Zero's RC Shop ambience
 
|-
 
|-
 
| 35
 
| 35
 
| DANCE
 
| DANCE
|  
+
| DDR
 
|-
 
|-
 
| 36
 
| 36
 
| SHOPKEEPER
 
| SHOPKEEPER
|  
+
| Restuarant shopkeeper AI
 
|-
 
|-
 
| 37
 
| 37
 
| CUSTOMER_PANIC
 
| CUSTOMER_PANIC
|  
+
| Ped's panic AI
 
|-
 
|-
 
| 38
 
| 38
 
| BAR_STAFF
 
| BAR_STAFF
|  
+
| Bartender AI
 
|-
 
|-
 
| 39
 
| 39
 
| BOUNCER
 
| BOUNCER
|  
+
| Bouncer AI
 
|-
 
|-
 
| 40
 
| 40
 
| OTB_STAFF
 
| OTB_STAFF
|  
+
| OTB staff AI
 
|-
 
|-
 
| 41
 
| 41
 
| PCHAIR
 
| PCHAIR
|  
+
| Restaurant ped in chair AI
 
|-
 
|-
 
| 42
 
| 42
 
| PCUSTOM
 
| PCUSTOM
|  
+
| Restaurant ped not in chair AI
 
|-
 
|-
 
| 43
 
| 43
 
| OTBWTCH
 
| OTBWTCH
|  
+
| OTB ped AI
 
|-
 
|-
 
| 44
 
| 44
Line 241: Line 241:
 
| DANCER
 
| DANCER
 
|  
 
|  
 +
|-
 +
| 53
 +
| STRIPW
 +
|
 +
|-
 +
| 54
 +
| STRIPM
 +
|
 +
|-
 +
| 55
 +
| BROWSE
 +
|
 +
|-
 +
| 56
 +
| COPSIT
 +
|
 +
|-
 +
| 57
 +
| COPLOOK
 +
|
 +
|-
 +
| 58
 +
| TICKET
 +
|
 +
|-
 +
| 59
 +
| SHOPPER
 +
|
 +
|-
 +
| 60
 +
| AMMU
 +
| Ammunation
 +
|-
 +
| 61
 +
| TATTOO
 +
| Tatto
 +
|-
 +
| 62
 +
| BARBER
 +
| Barber
 +
|-
 +
| 63
 +
| WARDROBE
 +
| Player's wardrobe
 +
|-
 +
| 64
 +
| CLOTHES
 +
| Clothes
 +
|-
 +
| 65
 +
| JUNKFUD
 +
|
 +
|-
 +
| 66
 +
| CARMOD1
 +
| Mod garage
 +
|-
 +
| 67
 +
| CRANE1
 +
| San Fierro and Las Venturas construction site cranes
 +
|-
 +
| 68
 +
| CRANE2
 +
| IE ship crane
 +
|-
 +
| 69
 +
| CRANE3
 +
| Quarry crane
 +
|-
 +
| 70
 +
| CARPARK1
 +
| Random car for carpark generators
 +
|-
 +
| 71
 +
| IMPOUND
 +
| Impound lots
 +
|-
 +
| 72
 +
| VALET
 +
| Valet
 +
|-
 +
| 73
 +
| PHOTO
 +
| Siucide photographer
 +
|-
 +
| 74
 +
| PRISONR
 +
| Prisoner AI
 +
|-
 +
| 75
 +
| CAMERA
 +
| Homie's camera holding AI
 +
|-
 +
| 76
 +
| DEBT
 +
| Casino debt
 +
|-
 +
| 77
 +
| HOTDOG
 +
| Hotdog van
 
|}
 
|}
 +
 +
[[Category:Mission Script]]

Revision as of 02:26, 1 April 2007

An external script is a script file used only in San Andreas that is outside the main script file, the main.scm. External scripts are located in the script.img file in the data/maps folder. The file is usually decompiled along with the main.scm. The maximum number of external scripts that can be defined is 82. The maximum number of external scripts that can be used simultaneously is 70. The game currently has 78 defined external scripts.

How 2.0

In order to add more external script files, you have to define the number of files you are going to use:
DEFINE EXTERNAL_SCRIPTS 78
Add the external script to the list with this:
DEFINE SCRIPT NAME AT LABEL
At the end of the file add your code in.

Opcodes

You can use the following opcodes to do stuff to your script file.
07D3 - I don't know how this work
0884 - Or this
08A9 - Loads the external script
08AB - Checks if the external script has been loaded
08E8 - Assigns an external script to a ped's model
090F - Ends the external script (doesn't seem to work)
0913 - Runs the external script after it has been loaded
0914 - No operation in PC and XBox versions
091C - Gets an actor within a sphere of the object using an external script
0926 - Gets the status of the external script, 0 if not loaded 0928 - Activates the external script when near the ped's model 0929 - Activates the external script when near the object's model

List of Scripts

The following is a list of external scripts that is used in the game.

Number Name Description
0 PLAYER_PARACHUTE Controls the player's parachute
1 PARACHUTE Controls the AI's parachute
2 BCESAR2 Smoke's money from Los Santos to San Fierro
3 BCESAR3 Smoke's yay from San Fierro to Los Santos
4 SLOT_MACHINE Slot machine
5 ROULETTE Roulette
6 OTB_SCRIPT Off track betting machine
7 ARCADE Arcade game mission checker (not the game itself)
8 VENDING_MACHINE Vending machines (both food and drinks)
9 FOOD_VENDOR Food vendors
10 GATES_SCRIPT Airport gates
11 GYMBIKE Bike
12 GYMBENCH Bench
13 GYMTREAD Treadmill
14 GYMDUMB Dumbell
15 BASKETB Basketball
16 VIDPOK Video poker machine
17 BLACKJ Blackjack
18 WHEELO Wheel of Fortune
19 DEALER Drug dealer
20 HOME_BRAINS Hobo's AI
21 POOL_SCRIPT Pool
22 LOWR_CONT Lowrider contest
23 BURG_BRAINS Burgulary's ped AI
24 GF_MEETING Girlfriend meeting
25 GF_DATE Girlfriend date
26 GF_SEX Girlfriend sex
27 CASINO_AMBIENCE Casino ambience
28 BAR_AMBIENCE Bar ambience
29 FOODBRAINS Restaurant's ped AI
30 OTB_AMBIENCE Off track betting ambience
31 STRIP_AMBIENCE Strip club ambience
32 PLANES Airline traveling
33 TRAINS Being a passenger in the train
34 ZERO_AMBIENCE Zero's RC Shop ambience
35 DANCE DDR
36 SHOPKEEPER Restuarant shopkeeper AI
37 CUSTOMER_PANIC Ped's panic AI
38 BAR_STAFF Bartender AI
39 BOUNCER Bouncer AI
40 OTB_STAFF OTB staff AI
41 PCHAIR Restaurant ped in chair AI
42 PCUSTOM Restaurant ped not in chair AI
43 OTBWTCH OTB ped AI
44 OTBSLP
45 OTBTILL
46 FBOOTHR
47 FBOOTHL
48 BARGUY
49 PEDROUL
50 PEDCARD
51 PEDSLOT
52 DANCER
53 STRIPW
54 STRIPM
55 BROWSE
56 COPSIT
57 COPLOOK
58 TICKET
59 SHOPPER
60 AMMU Ammunation
61 TATTOO Tatto
62 BARBER Barber
63 WARDROBE Player's wardrobe
64 CLOTHES Clothes
65 JUNKFUD
66 CARMOD1 Mod garage
67 CRANE1 San Fierro and Las Venturas construction site cranes
68 CRANE2 IE ship crane
69 CRANE3 Quarry crane
70 CARPARK1 Random car for carpark generators
71 IMPOUND Impound lots
72 VALET Valet
73 PHOTO Siucide photographer
74 PRISONR Prisoner AI
75 CAMERA Homie's camera holding AI
76 DEBT Casino debt
77 HOTDOG Hotdog van