GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
External Scripts EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
External Scripts EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
External Scripts EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
External Scripts EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
External Scripts EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
External Scripts EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
External Scripts EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
External Scripts EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
External Scripts EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar


You are not connected. Please login or register

External Scripts

Go down  Message [Page 1 of 1]

1External Scripts Empty External Scripts Fri Feb 06, 2009 1:09 am

Alex



Hi, I'm a friend of Gtasbigfoot's.

The first External Script begins, were the last mission of the main.scm ends.
After compiling the main.scm, the External Scripts are in script.img. (This apply's to the original main.scm).

1: Find:

Code:

DEFINE EXTERNAL_SCRIPTS 78


After you found this increase it by 1, so it becomes:


Code:

DEFINE EXTERNAL_SCRIPTS 79


2: Go to the end of the define external script and place this:


Code:

DEFINE SCRIPT demo  AT @Demo


3: We now move on to creating the threads starter; so we can start the extranal script.

Place this with the other create thread commands:


Code:

004F: create_thread @Starter


4: After we did this, search for:


Code:

//-------------Mission 0---------------


Before this place the starter of the extranal script:


Code:

:Starter
03A4: name_thread 'Starter'

:Start_1
0001: wait  0 ms
00D6: if 
0256:  player $PLAYER_CHAR defined
004D: jump_if_false @Start_1
00D6: if  0
0038:  $BMWW ==  0 
004D: jump_if_false @Start_1
00D6: if  0
00FF:  actor $PLAYER_ACTOR  sphere 1 near_point_on_foot X.Y.Z radius  2.0  2.0  2.0
004D: jump_if_false @Start_3

:Start_2
0926: $Script_Status = external_script_status  78 
00D6: if 
0038:  $Script_Status ==  0 
004D: jump_if_false @Start_5
08A9: load_external_script  1
00D6: if  0
08AB:  external_script  78  loaded
004D: jump_if_false @Start_5
0913: run_external_script  78 

:Start_5
0002: jump @Start_4

:Start_3
090F: end_external_script  78

:Start_4
0002: jump @Start_1


Of course, you should edit the starter, if needed, and replace X.Y.Z with coords.

5: Now, we have did this, you can go down to the last extranal script, and place yours:



Code:

//---------------------External script -1 (TEST)----------------------------

:Demo
03A4: name_thread "BMWW" 
0004: $BMWW =  1

//------------------------------------
//contents will go here
//------------------------------------

0004: $BMWW = 0
004E: end_thread



Notes:

A external script is a thread too. So no going above 33@ like normal scripts, they are valued to 0@..to 33@ (32@, 33@ local timers).


Relating to Mission Packs


In Mission Packs the game does not load the script.img, which means, external scripts, do not work. There is a patch which fixes this problem. Click!

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum