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
Global and Local Variables EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Global and Local Variables EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Global and Local Variables EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Global and Local Variables EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Global and Local Variables EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Global and Local Variables EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Global and Local Variables EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Global and Local Variables EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Global and Local Variables 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

Global and Local Variables

Go down  Message [Page 1 of 1]

1Global and Local Variables Empty Global and Local Variables Fri Feb 06, 2009 5:14 am

gtasbigfoot

gtasbigfoot
Admin

Global and Local Variables:

Local Variables:

Local Variables are denoted by a @
Their values are available only within the current thread.
Scripts and external scripts have a setback of 0@ to 33@ in San Andreas. 32@ and 33@ are denoted as local timers have should NOT be used or anything
else.

San Andreas missions have a much bigger setback than it's threads. SA missions uses locals in range of 0@ to 1023@



Global Variables:

Global Variables are denoted by a $ sign (dollar)
Their values are available from any place of a code. You must NOT use them for different things in main.scm

In CLEO scripts Global Variables can make crashes, or bugs. The only ones which should(can) be used are:

Code:

$PLAYER_CHAR
$PLAYER_ACTOR
$ONMISSION             

Beware that these Globals below have the same meaning as what they are pointing too! So be careful you do not use them for anything else.

Code:

$2 -> $PLAYER_CHAR
$409 -> $ONMISSION
$3 -> $PLAYER_ACTOR

Also if you're using these in normal main be careful that you do NOT use one which is used for something else. Check first!

CLEO 3 Rules:

Rules

1: No Globals other than the ones I spoke about above(and ones from the CustomVariables.txt).
2: Use 0A93: to end a CLEO thread not 004E: ( 0A93 =-> 0A93: end_custom_thread, 004E =-> 004E: end_thread )
3: In a mission script do not use 0A93: to end the mission, you must use 004E: like normal.
4: To compile a CLEO script as *.cs (custom script) use -> {$CLEO} or -> {$CLEO .cs}

5: To compile a CLEO mission script *.cm (custom mission) use -> {$CLEO .cm}
The starter pack of the mission you must start the mission with 0A94: (starter pack is normal thread so it should be a *.cs file)

Write the name of the *.cm you want to start *.cm is not needed as the opcode will search for the file with the extant.
Missions are not recommended for newbies.

http://gtamodding.com

Back to top  Message [Page 1 of 1]

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