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.

IF...THEN...END


Swoorup
 Share

Recommended Posts

 

{$VERSION 2.1.1000}{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'Ashwin' 032B: [email protected] = create_weapon_pickup #PYTHON ammo 15 9999 at 239.2362 -1279.4069 11.0712/////////Put your code here////////////:labelwait 0if 0214:   pickup [email protected] picked_up jf @label0109: player $PLAYER_CHAR money += 99999:actoragainwait 2000009A: [email protected] = create_actor 4 #HFYMD at 239.7125 -1287.2311 10.9015model.Load(#uzi)038B: load_requested_models :weaponloadwait 0if 0248:   model #uzi available jf @weaponload01B2: give_actor [email protected] weapon 23 ammo 9999 // Load the weapon model before using this01D2: actor [email protected] follow_player $PLAYER_CHAR 03BC: [email protected] = create_sphere  239.7125 -1287.2311 10.9015 30187: [email protected] = create_marker_above_actor [email protected]:stupidloop//if //0443:   player $PLAYER_CHAR in_a_car //then//00DA: [email protected] = player $PLAYER_CHAR car//036A: put_actor [email protected] in_car [email protected]//endwait 0if 0118:   actor [email protected] deadjf @stupidloopwait 2000034F: destroy_actor_with_fade [email protected] // The actor fades away like a ghost jump @actoragain                                                       05DC: end_custom_thread

 

 

No, the actor spawns and when i get in car, VC crashes

Do cleo changes some information in normal savefiles? How to not save cleo script in save file?

 

EDIT:Treat the comment below stupidloop label as code tounge.gif

Edited by Swoorup
Link to comment
Share on other sites

Maybe this could help. I think that 036A: put_actor [email protected] in_car [email protected] puts the actor in a car as a driver and I guess the player IS the driver, which means, the player should... disappear ;o. And then boom! Crash.

 

And I don't know if you can use a local variable at this time. Try a $ global variable for the actor.

Link to comment
Share on other sites

VC cleo is really annyoing.

IDK about that but

 

IF <condition><statement>else<statement>end

 

 

This structure does not work. Many things do no work

So i Have to stick with if.....jf structure

 

Link to comment
Share on other sites

Have you ever thought about your ignorance if nothing works? Don't you? What's wrong with that most common high level human-readable structure?

012          345
678   9A   BCD
EFG HIJK LMN
OPQR  STUV
WX    YZ

Link to comment
Share on other sites

I am trying to get an actor in my car but this crashes everytime, Whats wrong?

I commented it out just for no errors

 

//if //0443:   player $PLAYER_CHAR in_a_car //then//00DA: [email protected] = player $PLAYER_CHAR car//036A: put_actor [email protected] in_car [email protected]//end

 

So actor must be in car with PLAYER_CHAR ??

 

You can tie actor to player and actor will follow you (player) and also

make marker above car and disable if actor and PLAyER_ACTOR are in car biggrin.gif

 

Link to comment
Share on other sites

I am sorry if i seem lazy here. But I am really not playing around with you guys.

I tried that structure for destroying or fading away my actor but it caused crashes always.

 

Also I could not find any good VC tutorials concerning about that IF...THEN....ELSE structure.

It works for SA as people havenot complained anything about it but for VC cleo I really am confused

Most of the tutorial spaceenstein made for 'Create a mission' uses label and jump if false structure

 

EDIT:@Ify24

I already made the actor to follow me around but the thing is he just does not sit in my car, and i dont know how else to bring him in the car

Edited by Swoorup
Link to comment
Share on other sites

 

EDIT:@Ify24

I already made the actor to follow me around but the thing is he just does not sit in my car, and i dont know how else to bring him in the car

 

You are not using opcode tie actor to player... your are using that actor follow player :

 

 

01D2: actor [email protected] follow_player $PLAYER_CHAR 

 

 

Delete that opcode and put this opcode to TIE ACTOR TO PLAYER...

 

01DF: tie_actor $723 to_player $PLAYER_CHAR 

 

 

And by the way I think that it will be better that you load models that you are useing... and unload of course biggrin.gif

Edited by Ify24
Link to comment
Share on other sites

spaceeinstein

 

...when i get in car, VC crashes...

Let's see what happens when you enter the car, line by line.

 

 

if0443:   player $PLAYER_CHAR in_a_car

 

 

Ok, if player is in car, what happens?

 

 

then00DA: [email protected] = player $PLAYER_CHAR car

 

 

Ok, then you want the car to be recognized by the code. Nothing wrong so far.

 

 

036A: put_actor [email protected] in_car [email protected]

 

 

What's this? Usually if player is in car, player is the driver. 036A puts the actor in the driver seat, which is already occupied by you!

 

Ify's solution to the actor not entering the car with you looks like it would work. If it does, you can remove the commented code. The game does this job multiple times, so please check the original game script if you don't know how to tie an actor. If-then-else is a near universal expression that any English-speaking person can use. There's no need for a tutorial just for this specific game. If-then-else isn't needed if you already know how if-jf works.

Edited by spaceeinstein
Link to comment
Share on other sites

Wait, but he can use opcode:

 

01DF: tie_actor $723 to_player $PLAYER_CHAR 

 

And then I think that if player enter the car, actor should enter in the car too.

 

And he can get marker above car and repeat until actor.incar ( and player and actor) and then disaable marker... so if actor ( Player and actor) needs to be in car

this is solution....

Link to comment
Share on other sites

both of you sir thank you. Tie actor worked like a charm!!!

 

04F5: unknown_actor $723 kiss_player #spaceeinstein & #Ify24

tounge.gif

 

Found it in scm update

Link to comment
Share on other sites

I used tie actor to follow me. Then I used the IF structure given that if the actor is damaged by me then he should kill me.

He just raises his gun for a flash to me but wont kill me?

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.