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
Sun Mar 04, 2012 2:28 am by lavivi

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

» Mission Question
Thu Oct 14, 2010 1:02 am by findmy012

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

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

» Bc7 Mod Help
Fri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Fri Dec 18, 2009 4:22 am by _CJ360_

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

» Hello/Guidance Request
Mon 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



December 2016
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 

Calendar Calendar


You are not connected. Please login or register

[CLEO] Next Mission

View previous topic View next topic Go down  Message [Page 1 of 1]

1 [CLEO] Next Mission on Fri Feb 06, 2009 5:35 am

See in Sanny Builder > Help > CLEO 3 opcodes how them opcodes work.
Var 1 till var 99 is possible

Example starter pack(next mission using vars):
Here I'm going to show how they work in mission starter and the mission.

Code:

{$CLEO}
0A95: enable_thread_saving  // Save
0AB3: var 15 = 0  // Okay, we have set the value to 0

:MissionStarter_0
0001: wait 250 ms
00D6: if 
0256:  player $PLAYER_CHAR defined                                                                   
004D: jump_if_false @MissionStarter_0
00D6: if
0038:  $ONMISSION ==  0  // integer values
004D: jump_if_false @MissionStarter_0

:MissionStarter_1     
0AB4: 31@ = var 15
00D6: if         
0039:  31@ == 0  // integer values
004D: jump_if_false @NextMission // If is not equal to 0 then we go on to the next starter pack script 

:MissionStarter_2
0001: wait 250 ms
00D6: if  and       
0038:  $ONMISSION ==  0  // integer values
00FF:  actor $PLAYER_ACTOR sphere 1 in_sphere -1643.9039 -2235.2317 29.7644 radius 2.0 2.0 2.0 on_foot
004D: jump_if_false @MissionStarter_2
0004: $ONMISSION = 1     
00BA: text_styled ' '  1000 ms  2   
0A94: start_custom_mission " "
0002: jump @MissionStarter_0

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//                        Next Mission Starter                          //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

:NextMission
0AB4: 31@ = var 15
00D6: if         
0039:  31@ == 1 // integer values
004D: jump_if_false @Both_Mission_Passed_End_Thread  // Jump if this mission is also passed

:MissionStarter2_1
0001: wait 250 ms
00D6: if 
0256:  player $PLAYER_CHAR defined                                                                   
004D: jump_if_false @MissionStarter2_1
00D6: if
0038:  $ONMISSION ==  0  // integer values
004D: jump_if_false @MissionStarter2_1

:MissionStarter2_2
0001: wait 250 ms
00D6: if  and       
0038:  $ONMISSION ==  0 // integer values
00FF:  actor $PLAYER_ACTOR sphere 1 in_sphere -1643.9039 -2235.2317 29.7644 radius 2.0 2.0 2.0 on_foot
004D: jump_if_false @MissionStarter2_2
0004: $ONMISSION = 1     
00BA: text_styled ' '  1000 ms  2   
0A94: start_custom_mission " "
0002: jump @MissionStarter_0

:Both_Mission_Passed_End_Thread
0A93: end_custom_thread

Code:

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//                        In Mission 1                                  //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
{$CLEO .cm}

0AB4: 31@ = var 15
00D6: if
0039:  31@ ==  0  // integer values
004D: jump_if_false @SecondMission // Next Mission script

:Mission
0050: gosub @MissionStart1
00D6: if 
0112:  wasted_or_busted
004D: jump_if_false @MissionEnd1
0050: gosub @MissionFailed1                   

:MissionEnd1
0050: gosub @MissionCleanup1
004E: end_thread

:MissionStart1
//.......Mission Script.......//


:MissionPassed1 // This bit is the passed part
0AB3: var 15 = 1  // Is now set to 1, so the game does now know that one mission has been passed

// Or you can do it the way I do:
0AB4: 31@ = var 15
000A: 31@ +=  1  // integer values
0AB3: var 15 = 31@
// Use only one!
0051: return


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
//                        In Mission 2                                  //
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//

:SecondMission
0050: gosub @MissionStart2
00D6: if 
0112:  wasted_or_busted
004D: jump_if_false @MissionEnd2
0050: gosub @MissionFailed2                   

:MissionEnd2
0050: gosub @MissionCleanup2
004E: end_thread

:MissionStart2
//.......Mission Script.......//

:MissionPassed2 // This bit is the passed part
0AB3: var 15 = 2  // Is now set to 2, so the game does now know that two missions has been passed

// Or you can do it the way I do again:
0AB4: 31@ = var 15
000A: 31@ +=  1  // integer values
0AB3: var 15 = 31@
// Use only one!

View user profile http://gtamodding.com

View previous topic View next topic Back to top  Message [Page 1 of 1]

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