Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Bad.boy!

moving object

Recommended Posts

Bad.boy!

I've managed to add my models and load in a cleo script, and they show up perfect. I made the fence around area 69 and the gate in to seperate models, so that I could open it (like in one of the casino robbery missions). Anyway, I made this script, the model shows up, but it doesn't move when I stand in front of the gate.

 

 

{$CLEO .cs}thread 'FENCE' :FENCE_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @[email protected] = 191.141 [email protected] = 1870.04 [email protected] = [email protected] = 181.141 Model.Load(19101) :FENCE_2wait 0ifModel.Available(19101)jf @FENCE_2wait [email protected] = Object.Create(19101, [email protected], [email protected], [email protected])[email protected] = [email protected] = [email protected] = 129.2988 [email protected] = [email protected] = [email protected] = 1940.9181 [email protected] = 128.0425 [email protected] = 1926.3101 :FENCE_3wait 0ifActor.Driving($PLAYER_ACTOR)jf @ONFOOT_1jump @DRIVING_2:FENCE_4wait 0ifActor.Driving($PLAYER_ACTOR)jf @ONFOOT_3jump @DRIVING_4:DRIVING_1wait 0if or 01AB:   car [email protected] sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] stopped 01AB:   car [email protected] sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] stopped jf @DRIVING_2wait 100034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 5 5 5 flag 1 wait 5000jump @FENCE_4:DRIVING_2wait 0ifActor.Driving($PLAYER_ACTOR)jf @FENCE_303C0: [email protected] = actor $PLAYER_ACTOR car jump @DRIVING_1:DRIVING_3wait 0if01AB:   car [email protected] sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] stopped 01AB:   car [email protected] sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] stoppedjf @RESTARTjump @DRIVING_4:DRIVING_4wait 0ifActor.Driving($PLAYER_ACTOR)jf @FENCE_403C0: [email protected] = actor $PLAYER_ACTOR car jump @DRIVING_3:ONFOOT_1wait 0if or00A3:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] @ONFOOT_2wait 100034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 5 5 5 flag 1 wait 5000jump @FENCE_4:ONFOOT_2wait 0ifnot Actor.Driving($PLAYER_ACTOR)jf @FENCE_3jump @ONFOOT_1:ONFOOT_3wait 0if00A3:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] @RESTARTjump @ONFOOT_4:ONFOOT_4wait 0ifnot Actor.Driving($PLAYER_ACTOR)jf @FENCE_4jump @ONFOOT_3:RESTART034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 5 5 5 flag 1 wait 5000jump @FENCE_3 

 

 

 

Share this post


Link to post
Share on other sites
ZAZ

Your script is confused because of these checks if actor is driving

and you didn't got the import facts

Write it from new and start it in a simple way without these checks if actor is driving.

 

The move code must loop

and it needs a bit math coding to select if the door should move forward or backward (left or right)

 

Furthermore it needs to check if the door reached it's endposition

 

And I recomand to do at first a check if player is the the area to spawn the object

and if player isn't in the area or died or got arrested, then remove the object

so you can avoid that the object will be placed for ever

 

Have a look to this simple example

 

{$CLEO .cs}thread 'FENCE':FENCE_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @FENCE_11 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 191.141 1870.04 18.4766 radius 80.5 80.5 80.5 jf @FENCE_11 [email protected] = 191.141 [email protected] = 1870.04 [email protected] = 18.4766 [email protected] = 181.141 Model.Load(19101):FENCE_24wait 0 if   Model.Available(19101)jf @FENCE_24 [email protected] = Object.Create(19101, [email protected], [email protected], [email protected])Object.Angle([email protected]) = [email protected] = 141.225 [email protected] = 1941.988 [email protected] = 129.2988 [email protected] = 1961.094 [email protected] = 142.2845 [email protected] = 1940.918 [email protected] = 128.0425 [email protected] = 1926.31 [email protected] = 0 :FENCE_31wait 0 if   Player.Defined($PLAYER_CHAR)jf @FENCE_67 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 90.5 90.5 90.5 jf @FENCE_67 if 00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere [email protected] [email protected] [email protected] radius 10.5 10.5 10.5 jf @FENCE_31 if  [email protected] == 0 jf @FENCE_45 034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0 if 04E5:   object [email protected] near_point [email protected] [email protected] radius 1.0 1.0 flag 0 jf @FENCE_31 [email protected] = 1 wait 500 jump @FENCE_31 :FENCE_45if  [email protected] == 1 jf @FENCE_31 034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0 if 04E5:   object [email protected] near_point [email protected] [email protected] radius 1.0 1.0 flag 0 jf @FENCE_31 [email protected] = 0 wait 500 jump @FENCE_31 :FENCE_67Object.RemoveReferences([email protected])Model.Destroy(19101)jump @FENCE_11

 

Share this post


Link to post
Share on other sites
Deji

It's even more simple if you write in high construct. And ZAZ, what is the reasoning behind the label names? They're not even real offsets. And I can't help but find R*N's decision to have scripts running in a continous loop to be very practical.

Share this post


Link to post
Share on other sites
ZAZ

 

It's even more simple if you write in high construct.

I'm sceptical that he understand it.

 

{$CLEO .cs}thread 'FENCE'while truewait 0   if    00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 191.141 1870.04 18.4766 radius 80.5 80.5 80.5   then       [email protected] = 191.141        [email protected] = 1870.04        [email protected] = 18.4766        [email protected] = 181.141        Model.Load(2949)       repeat       wait 0         until Model.Available(2949)       [email protected] = Object.Create(2949, [email protected], [email protected], [email protected])       Object.Angle([email protected]) = 90.0       [email protected] = 0              :MoveLoop       wait 0       if and       Player.Defined($PLAYER_CHAR)       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 90.5 90.5 90.5        then           if            00FE:   actor $PLAYER_ACTOR sphere 1 in_sphere [email protected] [email protected] [email protected] radius 10.5 10.5 10.5           then               if                [email protected] == 0               then                   034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0                   if                    04E5:   object [email protected] near_point [email protected] [email protected] radius 1.0 1.0 flag 0                   then                   [email protected] = 1                   end                                             else                   034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0                   if                    04E5:   object [email protected] near_point [email protected] [email protected] radius 1.0 1.0 flag 0                   then                   [email protected] = 0                   end                               end           end           jump @MoveLoop                else       Object.RemoveReferences([email protected])       Model.Destroy(2949)       end   endend

 

 

 

And ZAZ, what is the reasoning behind the label names? They're not even real offsets. And I can't help but find R*N's decision to have scripts running in a continous loop to be very practical.

I started with the labelsystem and you with c++. As i wrote luascripts for gta4 i wished to could jump to a label and by very big scripts i would get confused. And i miss the elseif in sannybuilder.

Share this post


Link to post
Share on other sites
Deji

I started in SCM, actually. But I prefer to study and learn from R*N's code, since they designed the language. Still, even they use labels and goto for their main loops instead of a while loop (probably to give the TAB key a bit of a rest, lol). However, I do feel that where things can be as simple as if...then...end, it makes little sense to complicate it more with extra labels and bulk. And that a lot of problems can be avoided by assigning variables to constants etc.

 

It's just a personal preference I guess, but I always say it's best to read code like a book. The key words are there to bind it together. However, having to refer to different pages (labels) with names like "thread_249128" would reading the book difficult. And unfortunately, with SB as the only IDE I can only go so far in providing a R*-ish syntax with the OpcodeDB. But we can still get quite close.

 

I can certainly see from that code, though, that you are definitely a low-construct coder... Would you always indent code by tapping spacebar 3 times? tounge2.gif I was mainly just stumped by the way you named the labels.

 

 

I've no problem with the way people choose to code. But I hate it how the only tutorials (and don't get me wrong, they're some decent tutorials in regards to teaching methods, but not quite so much in attention to detail) teach habbits such as using purely low construct code and classes (which, I'm sorry, but no tutorial should be teaching to use classes), leaving the person knowing only one way of coding. And ultimately, we get a fair amount of help topics with code ranging from slightly flawed to down-right unreadable. So I try my best to get what I've learnt out there. One day I'll make a tutorial and it will probably be the opposite of everyone elses... a lot of attention to detail but hard to follow - cause as you can see, my posts usually end up much longer than I plan to make them tounge2.gif

 

 

ANYWAY... END OF TANGENT... I redid the code in a more R*N-like style (it won't compile though, unless you add the keywords - or wait for GTAG OpcodeDB v2 tounge2.gif). I also did a SCMy version in high construct with a few other alterations I felt were necessary.

 

SCRy: https://pastebin.com/Dhwg3KXk

SCMy: https://pastebin.com/5VDWJ6QJ

 

So I hope this post will enlighten some people... All coding languages can be written in so many different ways. SB is also pretty customisable. So don't think I'm trying to say that everything must be done the same way... The one and only thing I fully do not support at all is use of classes.

 

Please, someone write me a tutorial on posting small topics/replies. My mind just wanders and starts thinking about other things like how perfect the economy is right now. Yeah, really. That's what I think. Because there's no such thing as a perfect economy. The more perfect an economy is, the harder the next recession will hit. And recession is caused by people worrying too much about the economy ("omg, someone said fuel stocks are low! must by all I can right now" - great, a thousand other people do the same thing and oh look, now we actually are short on fuel).. oh shi.. see.. tangent....

Edited by Deji

Share this post


Link to post
Share on other sites
Bad.boy!

I can read high end codes. But low is easier (for me), and this script isn't very long, so it doesn't really matter.

 

Back on topic:

I want the fence to always be there. And I don't care if the player dies. I edited the script, because the gate doesn't close anymore, if you're not standing in front of it, and I increased wait otherwise the gate would open and 500ms later close.

I want to add this script in main.scm (because I want to use globals, to activate the gate in my mission).

Do I have to add it like this:

 

DEFINE EXTERNAL_SCRIPTS 79 // Use -1 in order not to compile AAA script...DEFINE SCRIPT A51GATE1 AT @A51GATE1    // 78

 

 

And then just add my code at the bottom:

 

//-------------External script 78 (A51GATE1)---------------thread 'A51GATE1':FENCE_1wait 0if Player.Defined($PLAYER_CHAR)jf @[email protected] = [email protected] = [email protected] = [email protected] = 177.141Model.Load(19101):FENCE_2wait 0if Model.Available(19101)jf @[email protected] = Object.Create(19101, [email protected], [email protected], [email protected]) //$A51_GATE1//$MANUALOVERRIDE = [email protected] = [email protected] = [email protected] = 1951.4904 [email protected] = [email protected] = 135.8451 [email protected] = [email protected] = [email protected] = 10.0:FENCE_3wait 0{if$MANUALOVERRIDE == 1jf @OVERRIDE_1}if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 299.0 299.0 299.0jf @FENCE_3if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @FENCE_3034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0if04E5:   object [email protected] near_point [email protected] [email protected] radius 0.1 0.1 flag 0jf @FENCE_3wait 6000jump @FENCE_4:FENCE_4wait 0034E: move_object [email protected] to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0if04E5:   object [email protected] near_point [email protected] [email protected] radius 0.1 0.1 flag 0jf @FENCE_4wait 3500jump @FENCE_3{:OVERRIDE_1wait 1000if$MANUALOVERRIDE == 0jf @OVERRIDE_1}

 

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
Bad.boy!
I added it to main.scm, but I'm getting a game crash with this code: Edited by Bad.boy!

Share this post


Link to post
Share on other sites
ZAZ

 

Game crashes at last part:

 

:A51GATE1_5wait 1000if$MANUALOVERRIDE == 0jf @A51GATE1_5

 

shure, what is missing here?

 

:A51GATE1_5wait 1000if$MANUALOVERRIDE == 0jf @A51GATE1_5?????????what is missing here???????

 

Share this post


Link to post
Share on other sites
LINK/2012

I laughed with ZAZ answer haha

Share this post


Link to post
Share on other sites
Bad.boy!

Still crashes I tried with locals and globals but I'm still getting a game crash.

 

 

//-------------External script 78 (A51GATE1)---------------:A51GATE1thread 'A51GATE1':A51GATE1_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @[email protected] = [email protected] = [email protected] = [email protected] = 177.141Model.Load(19101):A51GATE1_2wait 0ifModel.Available(19101)jf @A51GATE1_2$A51_GATE1 = Object.Create(19101, [email protected], [email protected], [email protected])$MANUALOVERRIDE = [email protected] = [email protected] = [email protected] = [email protected] = 19.[email protected] = [email protected] = [email protected] = [email protected] = 10.0:A51GATE1_3wait 0if$MANUALOVERRIDE == 0jf @A51GATE1_3if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 299.0 299.0 299.0jf @A51GATE1_3if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE1_3034E: move_object $A51_GATE1 to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE1 near_point [email protected] [email protected] radius 0.1 0.1 flag 0jf @A51GATE1_3wait 6000jump @A51GATE1_4:A51GATE1_4wait 0034E: move_object $A51_GATE1 to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE1 near_point [email protected] [email protected] radius 0.1 0.1 flag 0jf @A51GATE1_4wait 3500jump @A51GATE1_3

 

Share this post


Link to post
Share on other sites
ZAZ
Still crashes I tried with locals and globals but I'm still getting a game crash.

 

 

//-------------External script 78 (A51GATE1)---------------:A51GATE1thread 'A51GATE1':A51GATE1_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @[email protected] = [email protected] = [email protected] = [email protected] = 177.141Model.Load(19101):A51GATE1_2wait 0ifModel.Available(19101)jf @A51GATE1_2$A51_GATE1 = Object.Create(19101, [email protected], [email protected], [email protected])$MANUALOVERRIDE = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 10.0:A51GATE1_3wait 0if$MANUALOVERRIDE == 0jf @A51GATE1_3if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 299.0 299.0 299.0jf @A51GATE1_3if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE1_3034E: move_object $A51_GATE1 to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE1 near_point [email protected] [email protected] radius 0.1 0.1 flag 0jf @A51GATE1_3wait 6000jump @A51GATE1_4:A51GATE1_4wait 0034E: move_object $A51_GATE1 to [email protected] [email protected] [email protected] speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE1 near_point [email protected] [email protected] radius 0.1 0.1 flag 0jf @A51GATE1_4wait 3500jump @A51GATE1_3

 

This script works for me but i used another objectID and a stripped main.

How do you start the externscript?

Share this post


Link to post
Share on other sites
Deji

Are you also able to post the error information which windows provides when the game crashes?

Share this post


Link to post
Share on other sites
Bad.boy!

I didn't use stripped .scm, and I just figured out what made the game crash, I loaded a save. If I start a new game everything works fine. I thought that such a little mod wouldn't make such a big difference. I'll have to use stripped .scm I guess, because I can't start over each time I edit the main.scm.

 

EDIT:

I'm making a mpack mod and wanted to test a script by R*. But it doesn't work, which isn't amazing, because I can't code very well, I'll read Dutchy's tutorial one of these days, but can someone help me to get this to work, so that I can start.

 

DEFINE MISSIONS 0//DEFINE MISSION 0 AT "MISSION"DEFINE EXTERNAL_SCRIPTS 1 // Use -1 in order not to compile AAA scriptDEFINE SCRIPT GATES_SCRIPT AT @GATEOS  // 0DEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 574{ use macro (Ctrl+J) "headsa" to insert a file header      }var$PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 1 016A: fade 1 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box // put your create_thread commands here:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes0002: jump @MAIN_LOOP // put your mods (threads) here//-------------Mission 0---------------// put your missions here//-------------External script 0 (GATES_SCRIPT)---------------R* script

 

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
ZAZ

Externscripts don't work with MPack so far i know

Share this post


Link to post
Share on other sites
Bad.boy!

I used Seeman's patch, but I'm still getting the same message.

 

Found it in this topic (second post)

Share this post


Link to post
Share on other sites
ZAZ

 

I used Seeman's patch, but I'm still getting the same message.

 

Found it in this topic (second post)

ah yes, one more patch to fix it

but adding your script just as normal thread would be the easier way

or what else do you wanna add to your mpack? the whole origin main + your script?

Share this post


Link to post
Share on other sites
Bad.boy!

I thought that I had to add it in externe scripts, because R* does the same. I've changed it now, and added my own script. And edited my script, so that it works with 3 gates. But I'm having a problem compiling.

 

I've seen this structure in a script:

 

if...then...else...(end???)

 

 

I made this:

 

:A51GATES_3wait 0if $MANUALOVERRIDE == 0jf @A51GATES_3if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE1_1elseif00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] then jump @A51GATE2_1elseif00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE3_1elsejump @A51GATES_3end

 

 

I didn't make a proper end,does anyone know hot to end this?

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
LINK/2012

 

:A51GATES_3

wait 0

if

00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]

00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]

then

 

 

Here and there you need to use IF AND instead of IF, The EXE will read only one condition using IF.

 

 

I didn't make a proper end,does anyone know hot to end this?

You need TWO end's, you open two statements...

 

 

Edited by Link2012

Share this post


Link to post
Share on other sites
Bad.boy!

I need 3 end's. But at the start of the game I'm still getting the same screen.

 

My script v2 (models work, tested with a cleo script):

 

DEFINE MISSIONS 0//DEFINE MISSION 0 AT "MISSION"DEFINE EXTERNAL_SCRIPTS -1 // Use -1 to not write AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 574{ use macro (Ctrl+J) "headsa" to insert a file header      }var$PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 6 0111: toggle_wasted_busted_check 0 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 1 016A: fade 1 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25003E6: remove_text_box // put your create_thread commands here004F: create_thread @A51GATES{-----------------------------------------------------MAIN_LOOP--------------------------------------------------------}:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes0002: jump @MAIN_LOOP {------------------------------------------------------THREADS---------------------------------------------------------}// put your mods (threads) here:A51GATESthread 'A51GATES':A51GATES_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @A51GATES_1$GATE_X = 191.141$GATE_Y = 1870.04$GATE3_Y = 1866.84$GATE1_Z = 18.4766$GATE2_Z = 16.4766$GATE3_Z = 16.9766$DES_GATE1 = 177.141$DES_GATE2 = 1884.04$DES_GATE3 = 1870.04$MANUALOVERRIDE = 0{GATE 1}[email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 19.2209{GATE 2}[email protected] = [email protected] = 1821.6686 [email protected] = 17.6406 [email protected] = [email protected] = 1821.5704 [email protected] = 17.6406{GATE 3}[email protected] = 92.5317  [email protected] = 1920.9862 [email protected] = [email protected] = [email protected] = 1920.9558 [email protected] = 18.2755{RADIUS}[email protected] = [email protected] = 10.0Model.Load(19101)Model.Load(19102)Model.Load(19103):A51GATES_2wait 0ifModel.Available(19101)Model.Available(19102)Model.Available(19103)jf @A51GATES_2$A51_GATE1 = Object.Create(19101, $GATE_X, $GATE_Y, $GATE1_Z)$A51_GATE2 = Object.Create(19102, $GATE_X, $GATE_Y, $GATE2_Z)$A51_GATE3 = Object.Create(19103, $GATE_X, $GATE_Y, $GATE3_Z):A51GATES_3wait 0if $MANUALOVERRIDE == 0jf @A51GATES_3if   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   then       jump @A51GATE1_1   else   if       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]        then            jump @A51GATE2_1       else       if           00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]           00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       then           jump @A51GATE3_1       else           jump @A51GATES_3       end   endend{GATE 1}:A51GATE1_1wait 0 034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0jf @A51GATE1_1wait 4000:A51GATE1_2wait 0034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0jf @A51GATE1_2wait 3500jump @A51GATES_3{GATE 2}:A51GATE2_1wait 0034E: move_object $A51_GATE2 to $GATE_X $DES_GATE2 $GATE2_Z speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE2 near_point $GATE_X $DES_GATE2 radius 0.1 0.1 flag 0jf @A51GATE2_1wait 4000jump @A51GATE2_2:A51GATE2_2wait 0034E: move_object $A51_GATE2 to $GATE_X $GATE_Y $GATE2_Z speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE2 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0jf @A51GATE2_2wait 3500jump @A51GATES_3{GATE 3}:A51GATE3_1wait 0034E: move_object $A51_GATE3 to $GATE_X $DES_GATE3 $GATE3_Z speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE3 near_point $GATE_X $DES_GATE3 radius 0.1 0.1 flag 0jf @A51GATE3_1wait 4000jump @A51GATE3_2:A51GATE3_2wait 0034E: move_object $A51_GATE3 to $GATE_X $GATE3_Y $GATE3_Z speed 0.1 0.1 0.0 flag 0if04E5:   object $A51_GATE3 near_point $GATE_X $GATE3_Y radius 0.1 0.1 flag 0jf @A51GATE3_2wait 3500jump @A51GATES_3{------------------------------------------------------MISSIONS---------------------------------------------------------}//-------------Mission 0---------------// put your missions here

 

 

And I'm starting to now how to make high end codes, can anyone help with this part?

 

:A51GATE1_1wait 0034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0   then       wait 4000       034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0       repeat           wait 0           until 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0       end   else       jump @A51GATE1_1   endend 

 

Share this post


Link to post
Share on other sites
ZAZ

 

And I'm starting to now how to make high end codes, can anyone help with this part?
slowly, slowly, back to previous post and to Link2012's answer
I didn't make a proper end,does anyone know hot to end this?

You need TWO end's, you open two statements...

THREE end's alltogether, two additional statements

 

 

 

 

I made this:

 

:A51GATES_3wait 0if $MANUALOVERRIDE == 0jf @A51GATES_3if00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE1_1elseif00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] then jump @A51GATE2_1elseif00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE3_1elsejump @A51GATES_3end

 

 

I didn't make a proper end,does anyone know hot to end this?

Every IF-THEN needs it's END

It's like a open and a close tag

 

the IF-THEN-END's checks can be written in a rowor checks inside checks like boxes in a box in a boxso it can happens that you find more END's at the end[code]    end endend

 

 

--------------

 

only if-then-else-end is possible

if

...

then

...

else

...

end

 

but not

if-then-else-else-end

 

the meaning is: check the first condinal group or the other condinal group

 

---------------------------------

 

you forgot the or in your if statement because of 2 conditions in the check

 

-----------------------------------

 

your script snippet should look like this:

 

:A51GATES_3wait 0if$MANUALOVERRIDE == 0jf @A51GATES_3if  or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] @A51GATE1_1else   if  or   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   then   jump @A51GATE2_1   end   if  or   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   then   jump @A51GATE3_1   endend

 

 

 

 

 

 

 

And I'm starting to now how to make high end codes, can anyone help with this part?

 

:A51GATE1_1wait 0034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0   then       wait 4000       034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0       repeat           wait 0           until 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0       end   else       jump @A51GATE1_1   endend 

 

only 1 IF-THEN, so only 1 END

(unless you would have 2 addintionl IF-THEN which you didn't posted)

 

:A51GATE1_1wait 0034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0   if   04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0   then       wait 4000       repeat       wait 0       034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0       until 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0   else      jump @A51GATE1_1   end

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Bad.boy!

@ZAZ Your script doesn't do what it's intended to do:

 

This code:

 

:A51GATES_3wait 0if $MANUALOVERRIDE == 0jf @A51GATES_3if or   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   then       jump @A51GATE1_1   else   if or       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]        then            jump @A51GATE2_1       end          if or       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   then       jump @A51GATE3_1   endend

 

 

Decompiles in this:

 

:A51GATES_432wait 0 if  $MANUALOVERRIDE == 0 jf @A51GATES_432 if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] jf @A51GATES_529 jump @A51GATES_665 jump @A51GATES_665 :A51GATES_529if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] jf @A51GATES_597 jump @A51GATES_820 :A51GATES_597if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] jf @A51GATES_665 jump @A51GATES_982 :A51GATES_665wait 0 034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 collision_check 0 if 04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0 jf @A51GATES_665 wait 4000... 

 

 

If the player isn't in on of the spheres, the gate still opens.

 

 

 

 

My code worked:

 

:A51GATES_3wait 0if$MANUALOVERRIDE == 0jf @A51GATES_3if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]  then      jump @A51GATE1_1  else  if      00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]      00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]      then          jump @A51GATE2_1      else      if          00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]          00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]      then          jump @A51GATE3_1      else          jump @A51GATES_3      end  endend

 

 

Decompiled:

 

:A51GATES_432wait 0 if  $MANUALOVERRIDE == 0 else_jump @A51GATES_432 if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] else_jump @A51GATES_529 jump @A51GATES_686 jump @A51GATES_686 :A51GATES_529if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] else_jump @A51GATES_604 jump @A51GATES_841 jump @A51GATES_686 :A51GATES_604if or00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected] else_jump @A51GATES_679 jump @A51GATES_1003 jump @A51GATES_686 :A51GATES_679jump @A51GATES_432 :A51GATES_686wait 0 034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 collision_check 0 if 04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0 else_jump @A51GATES_686 wait 4000 ...

 

 

It made double jump command's, but the first one jumps correct (the important one).

 

 

second script:

 

:A51GATE1_1wait 0034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if  04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0  then      wait 4000      repeat          wait 0          034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0          until 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0  else      jump @A51GATE1_1end

 

 

Decompiled:

 

:NONAME_2wait 0 034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 collision_check 0 if 04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0 jf @NONAME_148 wait 4000 :NONAME_76wait 0 034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 collision_check 0 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0 jf @NONAME_76 jump @NONAME_155 :NONAME_148jump @NONAME_2 :NONAME_155...

 

 

There is no if for some reason

 

 

EDIT:

My MPACK works with my high end code and (as the second part) low end script, but I still want to know how to do it high end.

 

 

 

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
ZAZ

 

@ZAZ Your script doesn't do what it's intended to do:

yes, maybe, i just corrected your

 

if------then------elseifthen--------elseif---------then--------else---------end

 

 

 

into

 

 

 

if  or-------then--------else   if  or   -------------   then   -------------   end   if  or   ---------   then   ---------   endend

 

without any claim to do the work for your object

have a look to the END's

 

 

My code worked:

 

:A51GATES_3wait 0if$MANUALOVERRIDE == 0jf @A51GATES_3if  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]  then      jump @A51GATE1_1  else  if      00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]      00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]      then          jump @A51GATE2_1      else      if          00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]          00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]      then          jump @A51GATE3_1      else          jump @A51GATES_3      end  endend

 

now you did it right

 

if-----then ---else   if   -----   then   -----   else      if      --------      then      ------      else      ----      end   endend

 

 

 

 

Decompiled:

 

:NONAME_2wait 0 034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 collision_check 0 if 04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0 jf @NONAME_148 wait 4000 :NONAME_76wait 0 034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 collision_check 0 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0 jf @NONAME_76 jump @NONAME_155 :NONAME_148jump @NONAME_2 :NONAME_155...

 

 

There is no if...

that's ok, the if isn't neccesary by only one condition and by using the low construct

 

Share this post


Link to post
Share on other sites
Bad.boy!

Thanks for all the help, that part works now. But now I have an other problem, I've added my mission to the main, but I can't compile because of "A jump to zero offset found". But I have the thread names every were:

 

 

DEFINE MISSIONS 1DEFINE MISSION 0 AT @START           //Experiment 4083DEFINE EXTERNAL_SCRIPTS -1 // Use -1 to not write AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 574......004F: create_thread @A51GATES:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutesif   $ONMISSION == 0   then   if       $MISSION_START_PASSED == 1       then           wait 4000           $ONMISSION = 1           00BA: show_text_styled GXT 'MEXP_01' time 1000 style 2            0417: start_mission 0  // Experiment 4083       else           jump @MAIN_LOOP_1   endend:MAIN_LOOP_1wait $DEFAULT_WAIT_TIMEjump @MAIN_LOOP_1:A51GATESthread 'A51GATES':A51GATES_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @A51GATES_1...//-------------Mission 0---------------// Originally: Experiment 4083:START thread 'START':START_1gosub @MissionStart if wasted_or_busted then  gosub @MissionFailed end gosub @MissionCleanup end_thread :MissionStart......

 

Share this post


Link to post
Share on other sites
ZAZ

 

"A jump to zero offset found"

I didn't got that message but it crashed because the start codes like player create are missing

 

have look:

 

DEFINE MISSIONS 1DEFINE MISSION 0 AT @START           //Experiment 4083DEFINE EXTERNAL_SCRIPTS -1 // Use -1 to not write AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 574004F: create_thread @A51GATES////////////////////////////////////////////////////////////////// start codes for main.scm01F0: set_max_wanted_level_to 600C0: set_current_time 8 0 04E4: unknown_refresh_game_renderer_at 2488.5601 -1666.84 Camera.SetAtPos(2488.5601, -1666.84, 13.38)$PLAYER_CHAR = Player.Create(#NULL, 2488.5601, -1666.84, 13.38)$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)Camera.SetBehindPlayerset_weather 0          wait 0Player.Build($PLAYER_CHAR)Player.CanMove($PLAYER_CHAR) = Truefade 1 (out) 0 ms                     select_interior 0016C: restart_if_wasted at 2027.77 -1420.52 15.99 angle 137.0 unknown 0016D: restart_if_busted at 1550.68 -1675.49 14.51 angle 90.0 unknown 00180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here//////////////////////////////////////////////////////////////////////////// i recomand to place the  create_thread commands here:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutesif$ONMISSION == 0then   if   $MISSION_START_PASSED == 1   then          wait 4000          $ONMISSION = 1          00BA: show_text_styled GXT 'MEXP_01' time 1000 style 2          0417: start_mission 0  // Experiment 4083   else           jump @MAIN_LOOP_1  endend:MAIN_LOOP_1wait $DEFAULT_WAIT_TIMEjump @MAIN_LOOP_1:A51GATESthread 'A51GATES'end_thread//-------------Mission 0---------------// Originally: Experiment 4083:STARTthread 'START':START_1gosub @MissionStartifwasted_or_bustedthengosub @MissionFailedendgosub @MissionCleanupend_thread:MissionStart:MissionFailed:MissionCleanupreturn

 

 

 

 

important is opcode 0180: to make proper missions

 

 

 

 

Edited by ZAZ

Share this post


Link to post
Share on other sites
Bad.boy!

Still getting the same message, and I had all that btw, I didn't post it because it's long.

 

My full code (I'm still working on the mission, but it works as .cm):

 

DEFINE MISSIONS 1DEFINE MISSION 0 AT @START           // Experiment 4083DEFINE EXTERNAL_SCRIPTS -1 // Use -1 to not write AAA scriptDEFINE UNKNOWN_EMPTY_SEGMENT 0DEFINE UNKNOWN_THREADS_MEMORY 574{ use macro (Ctrl+J) "headsa" to insert a file header      }                       var$PLAYER_CHAR: Playerend // var 03A4: name_thread 'MAIN' 01F0: set_max_wanted_level_to 0 0111: toggle_wasted_busted_check 1 00C0: set_current_time_hours_to 8 minutes_to 0 04E4: unknown_refresh_game_renderer_at 2488.56 -1666.84 03CB: set_rendering_origin_at 2488.56 -1666.84 13.38 0053: $PLAYER_CHAR = create_player #NULL at 2488.56 -1666.84 13.38 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 0373: set_camera_directly_behind_player 01B6: set_weather 0 0001: wait 0 ms 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2 087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3 087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0 070D: rebuild_player $PLAYER_CHAR 01B4: toggle_player $PLAYER_CHAR can_move 1 016A: fade 1 time 0 04BB: select_interior 0 0629: change_integer_stat 181 to 4 016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 0004: $DEFAULT_WAIT_TIME = 25007B4: set_player $PLAYER_CHAR gang_recruitment_enabled 00746: set_acquaintance 1 of_actors_pedtype 8 to_actors_pedtype 0 0746: set_acquaintance 4 of_actors_pedtype 8 to_actors_pedtype 7 0746: set_acquaintance 3 of_actors_pedtype 8 to_actors_pedtype 9 0746: set_acquaintance 3 of_actors_pedtype 8 to_actors_pedtype 14 0746: set_acquaintance 3 of_actors_pedtype 7 to_actors_pedtype 0 0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 8 0746: set_acquaintance 3 of_actors_pedtype 7 to_actors_pedtype 9 0746: set_acquaintance 3 of_actors_pedtype 7 to_actors_pedtype 14 0746: set_acquaintance 3 of_actors_pedtype 9 to_actors_pedtype 0 0746: set_acquaintance 3 of_actors_pedtype 9 to_actors_pedtype 8 0746: set_acquaintance 3 of_actors_pedtype 9 to_actors_pedtype 7 0746: set_acquaintance 4 of_actors_pedtype 9 to_actors_pedtype 14 0746: set_acquaintance 3 of_actors_pedtype 14 to_actors_pedtype 0 0746: set_acquaintance 3 of_actors_pedtype 14 to_actors_pedtype 8 0746: set_acquaintance 3 of_actors_pedtype 14 to_actors_pedtype 7 0746: set_acquaintance 4 of_actors_pedtype 14 to_actors_pedtype 9 0746: set_acquaintance 3 of_actors_pedtype 10 to_actors_pedtype 11 0746: set_acquaintance 3 of_actors_pedtype 10 to_actors_pedtype 13 0746: set_acquaintance 3 of_actors_pedtype 11 to_actors_pedtype 10 0746: set_acquaintance 3 of_actors_pedtype 13 to_actors_pedtype 10 0746: set_acquaintance 4 of_actors_pedtype 13 to_actors_pedtype 11 0746: set_acquaintance 4 of_actors_pedtype 11 to_actors_pedtype 1304AE: $ICON_CASH = 52 // $ = any 03E6: remove_text_box // put your create_thread commands here004F: create_thread @A51GATES{-----------------------------------------------------MAIN_LOOP--------------------------------------------------------}:MAIN_LOOP0001: wait $DEFAULT_WAIT_TIME ms00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutesif   $ONMISSION == 0   then   if       $MISSION_START_PASSED == 1       then           wait 4000           $ONMISSION = 1           00BA: show_text_styled GXT 'MEXP_01' time 1000 style 2            0417: start_mission 0  // Experiment 4083       else           jump @MAIN_LOOP_1   endend:MAIN_LOOP_1wait $DEFAULT_WAIT_TIMEjump @MAIN_LOOP_1{------------------------------------------------------THREADS---------------------------------------------------------}// put your mods (threads) here:A51GATESthread 'A51GATES':A51GATES_1wait 0ifPlayer.Defined($PLAYER_CHAR)jf @A51GATES_1$GATE_X = 191.141$GATE_Y = 1870.04$GATE3_Y = 1866.84$GATE1_Z = 18.4766$GATE2_Z = 16.4766$GATE3_Z = 16.9766$DES_GATE1 = 177.141$DES_GATE2 = 1884.04$DES_GATE3 = 1870.04$MANUALOVERRIDE = 0{GATE 1}[email protected] = [email protected] = [email protected] = [email protected] = [email protected] = [email protected] = 19.2209{GATE 2}[email protected] = [email protected] = 1821.6686 [email protected] = 17.6406 [email protected] = [email protected] = 1821.5704 [email protected] = 17.6406{GATE 3}[email protected] = 92.5317  [email protected] = 1920.9862 [email protected] = [email protected] = [email protected] = 1920.9558 [email protected] = 18.2755{RADIUS}[email protected] = [email protected] = 10.0Model.Load(19101)Model.Load(19102)Model.Load(19103):A51GATES_2wait 0if andModel.Available(19101)Model.Available(19102)Model.Available(19103)jf @A51GATES_2$A51_GATE1 = Object.Create(19101, $GATE_X, $GATE_Y, $GATE1_Z)$A51_GATE2 = Object.Create(19102, $GATE_X, $GATE_Y, $GATE2_Z)$A51_GATE3 = Object.Create(19103, $GATE_X, $GATE3_Y, $GATE3_Z)           :A51GATES_3wait 0if$MANUALOVERRIDE == 0jf @A51GATES_3if or   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]   then       jump @A51GATE1_1   else   if or       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       then           jump @A51GATE2_1       else       if or           00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]           00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]       then           jump @A51GATE3_1       else           jump @A51GATES_3       end   endend:A51GATE1_1wait 0034E: move_object $A51_GATE1 to $DES_GATE1 $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE1 near_point $DES_GATE1 $GATE_Y radius 0.1 0.1 flag 0   then       wait 4000       repeat           wait 0           034E: move_object $A51_GATE1 to $GATE_X $GATE_Y $GATE1_Z speed 0.1 0.1 0.0 flag 0           until 04E5:   object $A51_GATE1 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0       jump @A51GATES_3   else       jump @A51GATE1_1end:A51GATE2_1wait 0034E: move_object $A51_GATE2 to $GATE_X $DES_GATE2 $GATE2_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE2 near_point $GATE_X $DES_GATE2 radius 0.1 0.1 flag 0   then       wait 4000       repeat           wait 0           034E: move_object $A51_GATE2 to $GATE_X $GATE_Y $GATE2_Z speed 0.1 0.1 0.0 flag 0           until 04E5:   object $A51_GATE2 near_point $GATE_X $GATE_Y radius 0.1 0.1 flag 0       jump @A51GATES_3   else       jump @A51GATE2_1end:A51GATE3_1wait 0034E: move_object $A51_GATE3 to $GATE_X $DES_GATE3 $GATE3_Z speed 0.1 0.1 0.0 flag 0if   04E5:   object $A51_GATE3 near_point $GATE_X $DES_GATE3 radius 0.1 0.1 flag 0   then       wait 4000       repeat           wait 0           034E: move_object $A51_GATE3 to $GATE_X $GATE3_Y $GATE3_Z speed 0.1 0.1 0.0 flag 0           until 04E5:   object $A51_GATE3 near_point $GATE_X $GATE3_Y radius 0.1 0.1 flag 0       jump @A51GATES_3   else       jump @A51GATE3_1end{------------------------------------------------------MISSIONS---------------------------------------------------------}//-------------Mission 0---------------// Originally: Experiment 4083:START thread 'START':START_1gosub @MissionStart if wasted_or_busted then  gosub @MissionFailed end gosub @MissionCleanup end_thread :MissionStartfade 0 500wait 500Model.Load(#SHADOWC1)Model.Load(#SHADOWC2)Model.Load(#SHADOWC3)Model.Load(#SHADOWC4)Model.Load(#SHADOWC5)Model.Load(#FOLEY)Model.Load(#ARMY)Model.Load(#WMOMIB)Model.Load(#WMOSCI)Model.Load(#BMYDRUG)Model.Load(#RANGER1)Model.Load(#RANGER2)Model.Load(#RANGER3)Model.Load(#M416)Model.Load(#M16A4)Model.Load(#CHROMEGUN)Model.Load(#ROCKETLA)04ED: load_animation "GANGS" :NOP_1await 0if andModel.Available(#SHADOWC1)Model.Available(#SHADOWC2)Model.Available(#SHADOWC3)Model.Available(#SHADOWC4)Model.Available(#SHADOWC5)Model.Available(#FOLEY)Model.Available(#ARMY)Model.Available(#WMOMIB) Model.Available(#WMOSCI)jf @NOP_1a:NOP_1bwait 0if andModel.Available(#RANGER1)Model.Available(#RANGER2)Model.Available(#RANGER3)Model.Available(#BMYDRUG)Model.Available(#M416)Model.Available(#M16A4)Model.Available(#CHROMEGUN)jf @NOP_1b:NOP_1cwait 0ifModel.Available(#ROCKETLA)04EE:   animation "GANGS" loaded jf @NOP_1cwait 1000048F: actor $PLAYER_ACTOR remove_weapons  09C7: change_player $PLAYER_CHAR model_to #[email protected] = 273.4008 [email protected] = 1855.5176 {[email protected] = }[email protected] = [email protected] = 1855.2236 [email protected] = 8.76490395: clear_area 1 at [email protected] [email protected] [email protected] radius 100.0  Actor.PutAt($PLAYER_ACTOR, [email protected], [email protected], [email protected])Actor.Angle($PLAYER_ACTOR) = 268.4969Actor.Create([email protected], GANG2, #FOLEY, [email protected], [email protected], [email protected])Actor.Angle([email protected]) = 87.9825Actor.Health($PLAYER_ACTOR) = 200Actor.Armour($PLAYER_ACTOR) = 1500605: actor $PLAYER_ACTOR perform_animation_sequence "prtial_gngtlkA" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA 0605: actor [email protected] perform_animation_sequence "prtial_gngtlkC" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA 02A3: enable_widescreen 1Camera.SetPosition(275.0029, 1857.4973, 8.7578, 0, 0, 0)Camera.PointAt([email protected], [email protected], [email protected], 2)fade 1 25000BC: show_text_highpriority GXT 'MEXP_02' time 3500 flag [email protected] = 0:NOP_2wait [email protected] > 3500jf @NOP_25 00BC: show_text_highpriority GXT 'MEXP_03' time 2500 flag [email protected] = 0jump @NOP_3:NOP_25wait 0if0AB0:  key_pressed 13jf @NOP_2jump @SKIP_CUT_1:NOP_3wait [email protected] > 2500jf @NOP_3500BC: show_text_highpriority GXT 'MEXP_04' time 4250 flag [email protected] = 0jump @NOP_4:NOP_35wait 0if0AB0:  key_pressed 13jf @NOP_3jump @SKIP_CUT_1:NOP_4wait [email protected] > 4250jf @NOP_4500BC: show_text_highpriority GXT 'MEXP_05' time 2500 flag [email protected] = 0jump @NOP_5:NOP_45wait 0if0AB0:  key_pressed 13jf @NOP_4jump @SKIP_CUT_1:NOP_5wait [email protected] > 2500jf @NOP_5500BC: show_text_highpriority GXT 'MEXP_06' time 3500 flag [email protected] = 0jump @NOP_6:NOP_55wait 0if0AB0:  key_pressed 13jf @NOP_5jump @SKIP_CUT_1:NOP_6wait [email protected] > 3500jf @NOP_6500BC: show_text_highpriority GXT 'MEXP_07' time 3500 flag [email protected] = 0jump @NOP_7:NOP_65wait 0if0AB0:  key_pressed 13jf @NOP_6jump @SKIP_CUT_1:NOP_7wait [email protected] > 3500jf @NOP_7500BC: show_text_highpriority GXT 'MEXP_08' time 2750 flag [email protected] = 0jump @NOP_8:NOP_75wait 0if0AB0:  key_pressed 13jf @NOP_7jump @SKIP_CUT_1:NOP_8wait [email protected] > 2750jf @NOP_85Camera.SetPosition(275.0029, 1857.4973, 8.7578, 0, 0, 0)Camera.PointAt([email protected], [email protected], [email protected], 2)00BC: show_text_highpriority GXT 'MEXP_09' time 2250 flag 1Actor.Create([email protected], GANG2, #SHADOWC2, 279.6523, 1859.5697, 8.7578)05D3: AS_actor [email protected] goto_point 277.0436 1857.4543 8.7578 mode 4 4500 ms // versionA  [email protected] = 0jump @NOP_9:NOP_85wait 0if0AB0:  key_pressed 13jf @NOP_8jump @SKIP_CUT_2:NOP_9wait [email protected] > 2250jf @NOP_90792: disembark_instantly_actor $PLAYER_ACTORPlayer.CanMove($PLAYER_CHAR) = falseCamera.SetPosition(271.0302, 1858.5891, 8.7578, 0, 0, 0)Camera.PointAt([email protected], [email protected], [email protected], 2)00BC: show_text_highpriority GXT 'MEXP_10' time 2500 flag [email protected] = 0:NOP_10wait [email protected] > 2500jf @NOP_10 02A3: enable_widescreen 0Camera.Restore_WithJumpCut()Marker.CreateAboveActor([email protected], [email protected])Marker.SetColor([email protected], 1)05D3: AS_actor [email protected] goto_point 277.9864 1860.5593 8.7578 mode 4 8500 ms // versionA 0792: disembark_instantly_actor [email protected]($PLAYER_CHAR) = truegosub @SPAWNS_1jump @WALK_01:WALK_01wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 277.9864 1860.5593 8.7578 radius 1.0 1.0 1.0jf @WALK_01 05D3: AS_actor [email protected] goto_point 275.3282 1864.6833 8.7578 mode 4 15000 ms // versionA} :WALK_02wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 275.3282 1864.6833 8.7578 radius 1.0 1.0 1.0jf @WALK_02 05D3: AS_actor [email protected] goto_point 297.7305 1869.1511 8.7578 mode 4 15000 ms // versionA :WALK_03wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 297.7305 1869.1511 8.7578 radius 1.0 1.0 1.0jf @WALK_03 05D3: AS_actor [email protected] goto_point 297.7746 1855.7181 7.8281 mode 4 15000 ms // versionA :WALK_05wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 297.7746 1855.7181 7.8281 radius 1.0 1.0 1.0jf @WALK_05 05D3: AS_actor [email protected] goto_point 313.8144 1855.123 7.8281 mode 4 15000 ms // versionA  :WALK_06wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 313.8144 1855.123 7.8281 radius 1.0 1.0 1.0jf @WALK_06 05D3: AS_actor [email protected] goto_point 313.791 1840.1541 7.8281 mode 4 15000 ms // versionA :WALK_07wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 313.791 1840.1541 7.8281 radius 1.0 1.0 1.0jf @WALK_07 05D3: AS_actor [email protected] goto_point 298.148 1839.8086 7.8281 mode 4 15000 ms // versionA :WALK_08wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 298.148 1839.8086 7.8281 radius 1.0 1.0 1.0jf @WALK_08 05D3: AS_actor [email protected] goto_point 298.0515 1820.3666 7.8205 mode 4 15000 ms // versionA :WALK_09wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 298.0515 1820.3666 7.8205 radius 1.0 1.0 1.0jf @WALK_09 05D3: AS_actor [email protected] goto_point 287.9536 1819.631 4.7104 mode 4 15000 ms // versionA:WALK_10wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere 287.9536 1819.631 4.7104 radius 1.0 1.0 1.0jf @WALK_10 [email protected] = [email protected] = [email protected] = 4.726605D3: AS_actor [email protected] goto_point [email protected] [email protected] [email protected] mode 4 15000 ms // versionA:WALK_11wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1 if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 1.0 1.0 1.0jf @WALK_11 if and02A0:   actor [email protected] stopped 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 2.0 2.0 2.0jf @WALK_11Actor.Angle([email protected]) = 268.473400BC: show_text_highpriority GXT 'MEXP_11' time 2500 flag 101B2: give_actor $PLAYER_ACTOR weapon 62 ammo 120 // Load the weapon model before using this:NOP_12wait 0gosub @DEAD_CHECK_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] wait 0if00FE: actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius 20.0 20.0 20.0jf @RUNNER_1wait 0ifActor.Dead([email protected])jf @NOP_12Player.CanMove($PLAYER_CHAR) = false02A3: enable_widescreen 1 Camera.SetPosition(290.588, 1814.4369, 4.7031, 0, 0, 0)Camera.PointAt([email protected], [email protected], [email protected], 2)Actor.Create([email protected], GANG2, #ARMY, 263.609, 1813.8738, 4.7031)05D3: AS_actor [email protected] goto_point 286.1072 1818.0745 4.7104 mode 7 4000 ms // versionA 022B: create_forbidden_for_peds_cube_cornerA 285.5081 1819.2085 4.7104 cornerB 289.481 1820.8149 4.7109 :NOP_13wait 0gosub @DEAD_CHECK_1if and00FE: actor [email protected] sphere 0 in_sphere 286.1072 1818.0745 4.7104 radius 1.0 1.0 1.002A0:   actor [email protected] stopped jf @NOP_13Actor.Angle([email protected]) = 214.2901Actor.Angle([email protected]) = 58.561905BF: AS_actor $PLAYER_ACTOR look_at_actor [email protected] 1000 ms 00BC: show_text_highpriority GXT 'MEXP_12' time 2500 flag [email protected] = 0:NOP_14wait [email protected] > 2500jf @NOP_1400BC: show_text_highpriority GXT 'MEXP_13' time 2000 flag 102A3: enable_widescreen 0 Player.CanMove($PLAYER_CHAR) = trueCamera.Restore()05DB: AS_actor [email protected] flee_from_actor $PLAYER_ACTOR from_origin_radius 50.0 timelimit -1:NOP_15wait 0gosub @DEAD_CHECK_1ifActor.Dead([email protected])jf @NOP_15 gosub @MissionPassed return :SPAWNS_1wait 100Actor.Create([email protected], GANG2, #WMOMIB, 266.7496, 1863.3257, 8.7649)Actor.Angle([email protected]) = 185.261701B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this 0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1 Actor.Create([email protected], GANG2, #WMOMIB, 270.3305, 1863.3969, 8.7649)Actor.Angle([email protected]) = 177.596501B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this 0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #WMOSCI, 275.5063, 1872.8422, 8.7649)Actor.Angle([email protected]) = 135.44110605: actor [email protected] perform_animation_sequence "prtial_gngtlkF" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA Actor.Create([email protected], GANG2, #WMOSCI, 273.9771, 1870.7415, 8.7578)Actor.Angle([email protected]) = 318.17240605: actor [email protected] perform_animation_sequence "prtial_gngtlkD" IFP_file "GANGS" 4.0 loop 1 0 0 0 time -1 // versionA} Actor.Create([email protected], GANG2, #RANGER1, 299.0412, 1869.6205, 8.7578)Actor.Angle([email protected]) = 140.009801B2: give_actor [email protected] weapon 63 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #WMOSCI, 293.0301, 1869.2849, 8.7578)05DE: AS_actor [email protected] walk_around_ped_pathActor.Create([email protected], GANG2, #RANGER1, 316.8625, 1856.9723, 7.7266)Actor.Angle([email protected]) = 270.4558 01B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER2, 316.5922, 1853.7881, 7.7341)Actor.Angle([email protected]) = 267.612501B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER2, 311.9703, 1852.2765, 7.7266)Actor.Angle([email protected]) = 183.493401B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER3, 315.1455, 1852.1947, 7.7266)Actor.Angle([email protected]) = 179.4201B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER3, 316.6678, 1839.6519, 7.734)Actor.Angle([email protected]) = 89.852701B2: give_actor [email protected] weapon 35 ammo 4 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER3, 299.943, 1824.3152, 7.8281)Actor.Angle([email protected]) = 93.921801B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER3, 275.4805, 1824.481, 7.8356)Actor.Angle([email protected]) = 271.873401B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #RANGER2, 297.6606, 1851.8784, 7.7341)Actor.Angle([email protected]) = 3.727701B2: give_actor [email protected] weapon 62 ammo 120 // Load the weapon model before using this0605: actor [email protected] perform_animation_sequence "IDLE_armed" IFP_file "PED" 4.0 loop 1 0 0 0 time -1Actor.Create([email protected], GANG2, #WMOSCI, 313.733, 1847.4655, 7.7266)05DE: AS_actor [email protected] walk_around_ped_pathActor.Create([email protected], GANG2, #WMOSCI, 297.932, 1839.8044, 7.8281)05DE: AS_actor [email protected] walk_around_ped_pathActor.Create([email protected], GANG2, #WMOSCI, 304.4154, 1854.6469, 7.7266)05DE: AS_actor [email protected] walk_around_ped_pathActor.Create([email protected], GANG2, #RANGER2, 302.9558, 1854.7003, 7.7266)01B2: give_actor [email protected] weapon 25 ammo 120 // Load the weapon model before using this05DE: AS_actor [email protected] walk_around_ped_pathActor.Create([email protected], GANG2, #RANGER3, 323.1101, 1839.6158, 7.734)05DE: AS_actor [email protected] walk_around_ped_path01B2: give_actor [email protected] weapon 25 ammo 120 // Load the weapon model before using this{Important Actor}Actor.Create([email protected], GANG2, #BMYDRUG, 300.2585, 1816.1958, 4.7109)Actor.Angle([email protected]) = 88.88510605: actor [email protected] perform_animation_sequence "cower" IFP_file "PED" 4.0 loop 1 0 0 0 time -1return :DEAD_CHECK_1wait 0if   Actor.Dead([email protected])   then       jump @WOLFDEAD   else   if       Actor.Dead([email protected])       then           jump @FRIENDLY_DEAD_1       else       if or           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])       then           jump @FRIENDLY_DEAD_2       else       if or           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           Actor.Dead([email protected])           then               jump @FRIENDLY_DEAD_2           else           if or               Actor.Dead([email protected])               Actor.Dead([email protected])               Actor.Dead([email protected])               Actor.Dead([email protected])               then                   jump @FRIENDLY_DEAD_2               else                   return               end           end       end   endend:SKIP_CUT_1fade 0 150wait 1500792: disembark_instantly_actor $PLAYER_ACTORActor.Create([email protected], GANG2, #SHADOWC2, 277.0436 1857.4543 8.7578)Marker.CreateAboveActor([email protected], [email protected])Marker.SetColor([email protected], 1)Camera.Restore_WithJumpCut()[email protected] = 2500fade 1 150wait 150jump @NOP_10:SKIP_CUT_2fade 0 150wait 1500792: disembark_instantly_actor $PLAYER_ACTORActor.DestroyInstantly([email protected])Actor.Create([email protected], GANG2, #SHADOWC2, 277.0436 1857.4543 8.7578)Marker.CreateAboveActor([email protected], [email protected])Marker.SetColor([email protected], 1)Camera.Restore_WithJumpCut()[email protected] = 2500fade 1 150wait 150jump @NOP_10:WOLFDEAD00BC: show_text_highpriority GXT 'MEXPF_01' time 500 flag 1wait 500return:FRIENDLY_DEAD_100BC: show_text_highpriority GXT 'MEXPF_03' time 500 flag 1wait 500return:FRIENDLY_DEAD_200BC: show_text_highpriority GXT 'MEXPF_04' time 500 flag 1wait 500return:RUNNER_100BC: show_text_highpriority GXT 'MEXPF_05' time 500 flag 1wait 500return:MissionPassedwait 5000394: play_music 1$MISSION_START_PASSED = 1 01E3: text_1number_styled 'M_PASSD' 0 5000 ms 1 // MISSION PASSED! return :MissionFailed 00BA: text_styled 'M_FAIL' 5000 ms 1 // ~r~MISSION FAILED! return :MissionCleanup$ONMISSION = 0 // integer values mission_cleanup return

 

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
ZAZ

 

Still getting the same message, and I had all that btw, I didn't post it because it's long.

 

It's because the A51GATES thread is open at the end, similar like this:

 

shure, what is missing here?

 

:A51GATE1_5wait 1000if$MANUALOVERRIDE == 0jf @A51GATE1_5?????????what is missing here???????

 

 

add a jump at the end to a previous label, i assume to label A51GATES_3 would be ok

 

:A51GATE3_1wait 0034E: move_object $A51_GATE3 to $GATE_X $DES_GATE3 $GATE3_Z speed 0.1 0.1 0.0 flag 0if  04E5:   object $A51_GATE3 near_point $GATE_X $DES_GATE3 radius 0.1 0.1 flag 0  then      wait 4000      repeat          wait 0          034E: move_object $A51_GATE3 to $GATE_X $GATE3_Y $GATE3_Z speed 0.1 0.1 0.0 flag 0          until 04E5:   object $A51_GATE3 near_point $GATE_X $GATE3_Y radius 0.1 0.1 flag 0      jump @A51GATES_3  else      jump @A51GATE3_1endjump @A51GATES_3 // <--------------- jump at the end{------------------------------------------------------MISSIONS---------------------------------------------------------}

 

 

 

the IF-THEN-END isn't a loop

use WHILE-END to make a loop

 

while truewait 0   if   ---   then   ---   endend

 

Share this post


Link to post
Share on other sites
Bad.boy!

Thanks, works biggrin.gifbiggrin.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.