Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

made gate opening cleo script: game crash


jani201
 Share

Recommended Posts

Edited because edited cleo mod is in last post------

Edited by jani201
Link to comment
Share on other sites

Try changing this part:

 

:GATEOPEN_27wait 0if Player.Defined($PLAYER_CHAR)else_jump @GATEOPEN_63if Player.Controllable($PLAYER_CHAR)else_jump @GATEOPEN_63

 

 

for this

 

:GATEOPEN_27wait 0if Player.Defined($PLAYER_CHAR)else_jump @GATEOPEN_27if Player.Controllable($PLAYER_CHAR)else_jump @GATEOPEN_27

 

 

also, this is unuseful, because you aren't checking anything:

 

ifelse_jump @GATEOPEN_63 

 

 

and you forgot to put the jump_if_false here:

 

if0474:  actor $PLAYER_ACTOR near_object_in_cube [email protected] radius 35.0 35.0 9.0 flag 0 

 

 

last but not least:

8AB0:  not key_pressed 36 

you can't use this opcode unless you use it in a conditional check (I thought you want to put that in the empty conditional check mentioned above)

Edited by Troll--dad
Link to comment
Share on other sites

 

and you forgot to put the jump_if_false here:

 

if0474:  actor $PLAYER_ACTOR near_object_in_cube [email protected] radius 35.0 35.0 9.0 flag 0

 

 

 

last but not least:

 

8AB0:  not key_pressed 36you can't use this opcode unless you use it in a conditional check (I thought you want to put that in the empty conditional check mentioned above)

 

 

For the useless line... it was ment to be for the key pressing part. i moved it to there and also changed it a bit:

if 8AB0:   not key_pressed 1 else_jump @GATEOPEN_63

 

 

and used else_jump instead of jump_if_false as it said flase directive.

 

and key_pressed is now:

0AB0:  key_pressed 0x36

idk if correct.

Link to comment
Share on other sites

 

and used else_jump instead of jump_if_false as it said flase directive.

 

are the same so no problem

 

 

0AB0:  key_pressed 0x36

 

in case you wanted to use the number 6 as key, then yes.

Link to comment
Share on other sites

Object [email protected] isn't defined anywhere, i think you have to define it (IDK how to do it)

 

If you want to check if the actor is in a concrete zone i recommend that code

 

00ED:   actor $PLAYER_ACTOR sphere 0 near_point [email protected] [email protected] radius 5.0 5.0 on_foot 

 

 

just change the variables in the points X and Y on map, use SannyBuilder Coord manager and the radius

 

The objects exist in the map, if not you have to create it (Load, check and create) with the [email protected] variable

Link to comment
Share on other sites

i can define it with model id with from med i think ^^ and i never saw it missing, so i must be coding blind biggrin.gif

Link to comment
Share on other sites

spaceeinstein

Your code shouldn't have create_thread and end_thread. Why would you place the end_thread anyways? The code never reads that line. When you want to make an object move, use the move_object opcode, not the throw_object opcode.

Link to comment
Share on other sites

the code above has the latest edited code that almost works.

 

 

//-------------MAIN---------------0001: wait 1000 ms 0A95: enable_thread_saving :NONAME_150107: $2706 = create_object 984 at -503.162 -563.021 27.3422 0001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @NONAME_15 00D6: if 03EE:   player $PLAYER_CHAR controllable 004D: jump_if_false @NONAME_15 :NONAME_7400D6: if 0474:   actor $PLAYER_ACTOR near_object_in_cube $2706 radius 35.0 35.0 9.0 flag 0 004D: jump_if_false @NONAME_74 00D6: if or00DD:   actor $PLAYER_ACTOR driving_car_with_model #RDTRAIN 00DD:   actor $PLAYER_ACTOR driving_car_with_model #LINERUN 00DD:   actor $PLAYER_ACTOR driving_car_with_model #PETROTR 004D: jump_if_false @NONAME_74 0001: wait 100 ms 034E: move_object $2706 to -503.162 -563.021 27.3422 speed 0.1 0.1 0 flag 1 :NONAME_1990001: wait 0 ms 8474:   not actor $PLAYER_ACTOR near_object_in_cube $2706 radius 20.0 20.0 5.0 flag 0 004D: jump_if_false @NONAME_199 034E: move_object $2706 to -489.762 -563.021 27.3422 speed 0.1 0.1 0 flag 1 0002: jump @NONAME_74 

 

Edited by jani201
Link to comment
Share on other sites

spaceeinstein

Stop using create_thread, they don't apply to CLEO scripts. When referring the gate object, you cannot use the object's IDE model number. If you think about it, it should be obvious. You're not moving all the gates out there, you're just moving only gate $2706.

Link to comment
Share on other sites

Well you might tell that to this error i get when trying to compile:

 

Compiled file has no header, so the model name #FENCE_sh*t2 can not be used. Use number ID instead.

 

 

Or maby you are saying that it needs to be in the create_object line but not in any other?

 

And changed the later id numbers to $2706

 

Edit: Now it doesn't crash the game, neither does it load it in new game or save game.

Edited by jani201
Link to comment
Share on other sites

spaceeinstein

Yes, I wasn't referring to the create_object opcode, I was referring to the other object-related opcodes. Create_object requires the model ID number, the others just the object's handle.

 

When you create an object, you shouldn't put create_object within a loop. If the conditional statements were false, the code will loop back to the beginning and recreate the object again until the conditional statements are true. You would end up with multiple objects and can crash the game. Place create_object outside the loop if you just want to create one gate.

 

Under NONAME_74, you didn't place a wait. If the code performs a loop, it have to go through a wait opcode.

Edited by spaceeinstein
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 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.