Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      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

HELP it is simple, but not for me...


RnBoy15
 Share

Recommended Posts

So, i wanted to create a simple script, if I sit in a sports car and press key, then i can take it to a place where is a red circle, and if I am in the circle and in the car stopped, then the export is done, gives me some money and thats all.

 

The script for me seems okay, but if i sit in a sport car and press the key, I instantly get the cash, export finished... its like the conditions of the script is allways true, but i cant find the problem, pls HELP...

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------$DRIVEBYMODE = 0 $PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR):NONAME_15wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @NONAME_15 if or  Actor.DrivingVehicleType($PLAYER_ACTOR, #CHEETAH)  Actor.DrivingVehicleType($PLAYER_ACTOR, #BANSHEE)  Actor.DrivingVehicleType($PLAYER_ACTOR, #ELEGY)  Actor.DrivingVehicleType($PLAYER_ACTOR, #INFERNUS)  Actor.DrivingVehicleType($PLAYER_ACTOR, #TURISMO)  Actor.DrivingVehicleType($PLAYER_ACTOR, #SULTAN)  Actor.DrivingVehicleType($PLAYER_ACTOR, #BULLET)else_jump @NONAME_15 jump @NONAME_109 :NONAME_109wait 0 if 0AB0:   key_pressed 53 else_jump @NONAME_15 018C: play_sound 1058 at 0.0 0.0 0.0 03E5: show_text_box 'DRV_4' 03C0: [email protected] = actor $PLAYER_ACTOR car [email protected] = Marker.CreateIconAndSphere(0, -2315.53, 1544.93, 18.7734)jump @NONAME_196 :NONAME_196wait 0 if 0100:   actor $PLAYER_ACTOR in_sphere -2315.53 1544.93 18.7734 radius 4.0 4.0 4.0 sphere 0 in_car jump @NONAME_308 else_jump @NONAME_196 if 0AB0:   key_pressed 53 else_jump @NONAME_196 018C: play_sound 1058 at 0.0 0.0 0.0 03E5: show_text_box 'DRV_6' jump @NONAME_15 :NONAME_308wait 0 018C: play_sound 1058 at 0.0 0.0 0.0 03E5: show_text_box 'DRV_7' Car.RemoveReferences([email protected])Player.Money($PLAYER_CHAR) += 100000jump @NONAME_15 

 

Link to comment
Share on other sites

 

{$CLEO .cs}const   stage                       = [email protected]   player_car                  = [email protected]   blip1                       = [email protected]   blip1_created               = [email protected]:while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if or           00DD:   actor $PLAYER_ACTOR driving_car_with_model #CHEETAH           00DD:   actor $PLAYER_ACTOR driving_car_with_model #BANSHEE           00DD:   actor $PLAYER_ACTOR driving_car_with_model #ELEGY           00DD:   actor $PLAYER_ACTOR driving_car_with_model #INFERNUS           00DD:   actor $PLAYER_ACTOR driving_car_with_model #TURISMO           00DD:   actor $PLAYER_ACTOR driving_car_with_model #SULTAN           00DD:   actor $PLAYER_ACTOR driving_car_with_model #BULLET       then           if               stage == 0           then               if                   0AB0:   key_pressed 53               then                   018C: play_sound 1058 at 0.0 0.0 0.0                   03E5: show_text_box 'DRV_4'             // btw, this makes a sound too, so you might not hear the above sound...                   03C0: player_car = actor $PLAYER_ACTOR car                   gosub @CleanBlips                   02A7: blip1 = create_icon_marker_and_sphere 0 at -2315.53 1544.93 18.7734                   stage = 1                   blip1_created = 1               end           end           if               stage == 1           then               if                   0100:   actor $PLAYER_ACTOR in_sphere -2315.53 1544.93 18.7734 radius 4.0 4.0 4.0 sphere 0 in_car               then                   018C: play_sound 1058 at 0.0 0.0 0.0                   03E5: show_text_box 'DRV_7'                   0109: player $PLAYER_CHAR money += 100000                   gosub @CleanBlips                   stage = 2  // set this to 0 if you wanna allow more exports               end           end       else           gosub @CleanBlips           stage = 0       end   else       gosub @CleanBlips       stage = 0   endend:CleanBlipsif   blip1_created == 1then   0164: disable_marker blip1   blip1_created = 0endreturn

 

 

Now would be a great time to learn to code in a higher level!

Link to comment
Share on other sites

Thank you man! from where can i learn this high level scripting?

 

You mind if I ask you some questions?

 

1. what does

stage == 0

and

stage ==1

means?

 

2. if somewhere in the script appears

gosub @Allay

, the :Allay procedure will be done, but if on the end of :Allay there is a

return

, than it means it will continue the unfinished procedure where the

gosub @Allay

was?

Edited by RnBoy15
Link to comment
Share on other sites

{$CLEO .cs}const   stage                       = [email protected]   player_car                  = [email protected]   blip1                       = [email protected]   blip1_created               = [email protected]:while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if or           00DD:   actor $PLAYER_ACTOR driving_car_with_model #CHEETAH           00DD:   actor $PLAYER_ACTOR driving_car_with_model #BANSHEE           00DD:   actor $PLAYER_ACTOR driving_car_with_model #ELEGY           00DD:   actor $PLAYER_ACTOR driving_car_with_model #INFERNUS           00DD:   actor $PLAYER_ACTOR driving_car_with_model #TURISMO           00DD:   actor $PLAYER_ACTOR driving_car_with_model #SULTAN           00DD:   actor $PLAYER_ACTOR driving_car_with_model #BULLET       then           if               stage == 0           then               if                   0AB0:   key_pressed 53               then                   018C: play_sound 1058 at 0.0 0.0 0.0                   03E5: show_text_box 'DRV_4'             // btw, this makes a sound too, so you might not hear the above sound...                   03C0: player_car = actor $PLAYER_ACTOR car                   gosub @CleanBlips                   02A7: blip1 = create_icon_marker_and_sphere 0 at -2315.53 1544.93 18.7734                   stage = 1                   blip1_created = 1               end           end           if               stage == 1           then               if                   0100:   actor $PLAYER_ACTOR in_sphere -2315.53 1544.93 18.7734 radius 4.0 4.0 4.0 sphere 0 in_car               then                   018C: play_sound 1058 at 0.0 0.0 0.0                   03E5: show_text_box 'DRV_7'                   0109: player $PLAYER_CHAR money += 100000                   gosub @CleanBlips                   stage = 2  // set this to 0 if you wanna allow more exports               end           end       else           gosub @CleanBlips           stage = 0       end   else       gosub @CleanBlips       stage = 0   endend:CleanBlipsif   blip1_created == 1then   0164: disable_marker blip1   blip1_created = 0endreturn

 

 

Now would be a great time to learn to code in a higher level!

biggrin.gif it works, but how can i make it that so if i exit the car, i can still bring the car to the point? because if i exit, the export ends too

Link to comment
Share on other sites

Thank you man! from where can i learn this high level scripting?

 

You mind if I ask you some questions?

 

1. what does

stage == 0

and

stage ==1

means?

 

2. if somewhere in the script appears

gosub @Allay

, the :Allay procedure will be done, but if on the end of :Allay there is a

return

, than it means it will continue the unfinished procedure where the

gosub @Allay

was?

1. It compares the value from "stage" with 0 and 1 (in these cases).

 

2. Yep.

Link to comment
Share on other sites

Read code like a book with missing words.

 

 

   if   // if the player is playing (not wasted or busted)...      0256:   player $PLAYER_CHAR defined  then      if or   // ... and is driving one of these models of car...          00DD:   actor $PLAYER_ACTOR driving_car_with_model #CHEETAH          00DD:   actor $PLAYER_ACTOR driving_car_with_model #BANSHEE          00DD:   actor $PLAYER_ACTOR driving_car_with_model #ELEGY          00DD:   actor $PLAYER_ACTOR driving_car_with_model #INFERNUS          00DD:   actor $PLAYER_ACTOR driving_car_with_model #TURISMO          00DD:   actor $PLAYER_ACTOR driving_car_with_model #SULTAN          00DD:   actor $PLAYER_ACTOR driving_car_with_model #BULLET      then[...]          if              stage == 1          then              // then check if the player is in the sphere for export              if                  0100:   actor $PLAYER_ACTOR in_sphere -2315.53 1544.93 18.7734 radius 4.0 4.0 4.0 sphere 0 in_car              then                  018C: play_sound 1058 at 0.0 0.0 0.0                  03E5: show_text_box 'DRV_7'                  0109: player $PLAYER_CHAR money += 100000                  gosub @CleanBlips                  stage = 2  // set this to 0 if you wanna allow more exports              end          end

 

 

So you just need to move the code which checks if the player is in the area for exports outside of the code that checks if the player is in a vehicle.

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.