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.

Script help


Mitorafer
 Share

Recommended Posts

I'm Trying to make a pizza delivery cleo mod and from whierd reson the game crash can someone help???

 

here the script many things aint done:

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'PIZZA' 0208: [email protected] = random_float_in_ranges -10.0 10.0 0208: [email protected] = random_float_in_ranges -10.0 10.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 0.0 jump @PIZZA_73 :PIZZA_73wait 0 Model.Load(#PIZZABOY)Model.Load(#WMYPIZZ)038B: load_requested_models jump @PIZZA_96 :PIZZA_96wait 0 if   Model.Available(#PIZZABOY)  Model.Available(#WMYPIZZ)else_jump @PIZZA_96 wait 0 jump @PIZZA_132 :PIZZA_132wait 0 if   Player.Defined($PLAYER_ACTOR)else_jump @PIZZA_132 if  $ONMISSION == 0 else_jump @PIZZA_132 if 0AB0:   key_pressed 17 else_jump @PIZZA_132 if 0AB0:   key_pressed 80 else_jump @PIZZA_132 wait 0 jump @PIZZA_211 :PIZZA_211wait 3000 [email protected] = Actor.Create(CivMale, #WMYPIZZ, 2069.025, -1827.688, 13.5469)[email protected] = Car.Create(#PIZZABOY, [email protected], [email protected], [email protected])jump @PIZZA_265 :PIZZA_265wait 0 072A: put_actor [email protected] into_car [email protected] driverseat if 80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 5.0 5.0 5.0 else_jump @PIZZA_265 [email protected] += 1000.0 02CE: [email protected] = ground_z_at [email protected] [email protected] [email protected] 0A8D: [email protected] = read_memory 9867536 size 4 virtual_protect 0 0A8D: [email protected] = read_memory 9867540 size 2 virtual_protect 0 0A8D: [email protected] = read_memory 9867542 size 1 virtual_protect 0 0208: [email protected] = random_float_in_ranges 0.0 360.0 Car.Angle([email protected]) = [email protected]: unknown_car [email protected] flag 1 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 Car.DriveTo([email protected], [email protected], [email protected], [email protected])wait 0 0918: enable_car [email protected] engine 0 [email protected] = Marker.CreateAboveActor([email protected])Marker.SetColor([email protected], 1)wait 0 05CD: AS_actor [email protected] exit_car [email protected] 0639: AS_actor $PLAYER_ACTOR rotate_to_actor [email protected] wait 1000 0677: AS_actor $PLAYER_ACTOR chat_with_actor [email protected] lead_speaker_flag 1 unknown_flag 1 wait 3000 Player.Money($PLAYER_CHAR) += 17Actor.Health($PLAYER_ACTOR) = 500wait 100 05CB: AS_actor [email protected] enter_car [email protected] as_driver 10000 ms 06BB: set_actor [email protected] drive_car [email protected] speed 50.0 along_SCM_path jump @PIZZA_576 :PIZZA_576wait 5000 Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])wait 5000 Model.Destroy(#PIZZABOY)Model.Destroy(#WMYPIZZ)Marker.Disable([email protected])jump @PIZZA_73

 

 

the game crash when after i press the hotkeys whats the prob???

Link to comment
Share on other sites

 

0A8D: [email protected] = read_memory 9867536 size 4 virtual_protect 00A8D: [email protected] = read_memory 9867540 size 2 virtual_protect 00A8D: [email protected] = read_memory 9867542 size 1 virtual_protect 00208: [email protected] = random_float_in_ranges 0.0 360.0Car.Angle([email protected]) = [email protected]: unknown_car [email protected] flag 10407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0

 

I'm not sure what you try to achieve, but as far as I know, memory location 9867536 contains the last pressed keys on the keyboard. You're using the result ([email protected]) in an opcode that requires it to be a car handle. The odds that you typed a valid car handle are extremely slim catspider.gif .

 

There are other weird things in your code, but I guess this is the one that causes the crash.

bS8xA.png
Link to comment
Share on other sites

 

0A8D: [email protected] = read_memory 9867536 size 4 virtual_protect 00A8D: [email protected] = read_memory 9867540 size 2 virtual_protect 00A8D: [email protected] = read_memory 9867542 size 1 virtual_protect 00208: [email protected] = random_float_in_ranges 0.0 360.0Car.Angle([email protected]) = [email protected]: unknown_car [email protected] flag 10407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0

 

I'm not sure what you try to achieve, but as far as I know, memory location 9867536 contains the last pressed keys on the keyboard. You're using the result ([email protected]) in an opcode that requires it to be a car handle. The odds that you typed a valid car handle are extremely slim  catspider.gif .

 

There are other weird things in your code, but I guess this is the one that causes the crash.

you were Right I removed the trash in the script now the game ain't crashin but the driver dosen't come correctly to cj and when he leaves he hites the walls and fall over and over

 

so new and updated script:

 

thread 'PIZZA'  jump @PIZZA_73 :PIZZA_73wait 0 Model.Load(#PIZZABOY)Model.Load(#WMYPIZZ)038B: load_requested_models jump @PIZZA_96 :PIZZA_96wait 0 if   Model.Available(#PIZZABOY)  Model.Available(#WMYPIZZ)else_jump @PIZZA_96  jump @PIZZA_132 :PIZZA_132wait 0 if   Player.Defined($PLAYER_ACTOR)else_jump @PIZZA_132 if  $ONMISSION == 0 else_jump @PIZZA_132 if 0AB0:   key_pressed 17 else_jump @PIZZA_132 if 0AB0:   key_pressed 80 else_jump @PIZZA_132  jump @PIZZA_211 :PIZZA_211wait 3000 [email protected] = Actor.Create(CivMale, #WMYPIZZ, 2069.025, -1827.688, 13.5469)[email protected] = Car.Create(#PIZZABOY, 2111.158, -1824.871, 13.5561)0175: set_car [email protected] Z_angle_to 89.4914 jump @PIZZA_265 :PIZZA_265wait 0 072A: put_actor [email protected] into_car [email protected] driverseat  [email protected] = Marker.CreateAboveActor([email protected])Marker.SetColor([email protected], 1)04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 1.0 3.0 1.005D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 50.0 0 model #NULL 005CD: AS_actor [email protected] exit_car [email protected] 100 0639: AS_actor [email protected] rotate_to_actor $PLAYER_ACTOR  0677: AS_actor [email protected] chat_with_actor $PLAYER_ACTOR lead_speaker_flag 1 unknown_flag 1 wait 3000 Player.Money($PLAYER_CHAR) += -17Actor.Health($PLAYER_ACTOR) = 500wait 100 05CB: AS_actor [email protected] enter_car [email protected] as_driver 10000 ms 06BB: set_actor [email protected] drive_car [email protected] speed 10.0 along_SCM_path jump @PIZZA_576 :PIZZA_576wait 5000 Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])wait 5000 Model.Destroy(#PIZZABOY)Model.Destroy(#WMYPIZZ)Marker.Disable([email protected])jump @PIZZA_73

 

 

as you can see i removed many 'wait 0' in the script and things you show i still need some help

Link to comment
Share on other sites

The problem is that opcode 05D1, doesn't wait until the actor arrives at the location, but merely gives the command to the actor and than continue with the next command, which tells him to get out of the car.

 

A possible solution it to build a loop after 05D1, which waits until the actor actually reached the given coordinates, and after that proceed with exiting the car.

bS8xA.png
Link to comment
Share on other sites

Changes many stuff still car dosen't get to player actor and leave well and i try adding text but it dosen't show i created .fxt with all stuff how can it show???

 

Improved again script:

 

thread 'PIZZA' jump @PIZZA_18 :PIZZA_18wait 0 Model.Load(#PIZZABOY)Model.Load(#WMYPIZZ)Model.Load(#CELLPHONE)038B: load_requested_models jump @PIZZA_46 :PIZZA_46wait 0 if   Model.Available(#PIZZABOY)  Model.Available(#WMYPIZZ)  Model.Available(#CELLPHONE)else_jump @PIZZA_46 jump @PIZZA_83 :PIZZA_83wait 0 if and $ONMISSION == 0 0AB0:   key_pressed 17 0AB0:   key_pressed 80 else_jump @PIZZA_83 jump @PIZZA_120 :PIZZA_120wait 0 0729: AS_actor $PLAYER_ACTOR hold_cellphone 1 wait 3000 00BC: show_text_highpriority GXT 'PZZ1' time 3000 flag 1 00BC: show_text_highpriority GXT 'PZZ2' time 3000 flag 1 00BC: show_text_highpriority GXT 'PZZ3' time 3000 flag 1 wait 3000 0729: AS_actor $PLAYER_ACTOR hold_cellphone 0 [email protected] = Actor.Create(CivMale, #WMYPIZZ, 2069.025, -1827.688, 13.5469)[email protected] = Car.Create(#PIZZABOY, 2111.158, -1824.871, 13.5561)Car.Angle([email protected]) = 89.4914jump @PIZZA_261 :PIZZA_261wait 0 072A: put_actor [email protected] into_car [email protected] driverseat [email protected] = Marker.CreateAboveActor([email protected])Marker.SetColor([email protected], 1)04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 1.0 3.0 1.0 02C1: store_to [email protected] [email protected] [email protected] car_path_coords_closest_to [email protected] [email protected] [email protected] 05D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 200.0 0 model #NULL 0 wait 1000 if 01AE:   car [email protected] sphere 0 near_point [email protected] [email protected] radius 3.0 3.0 stopped else_jump @PIZZA_261 05CD: AS_actor [email protected] exit_car [email protected] wait 1500 0639: AS_actor [email protected] rotate_to_actor $PLAYER_ACTOR wait 500 00BC: show_text_highpriority GXT 'PZZ4' time 1000 flag 1 00BC: show_text_highpriority GXT 'PZZ5' time 3000 flag 1 Player.Money($PLAYER_CHAR) += -17Actor.Health($PLAYER_ACTOR) = 500wait 100 05CB: AS_actor [email protected] enter_car [email protected] as_driver 10000 ms 06BB: set_actor [email protected] drive_car [email protected] speed 50.0 along_SCM_path wait 100 00AE: set_car [email protected] traffic_behaviour_to 0 jump @PIZZA_523 :PIZZA_523wait 5000 Actor.RemoveReferences([email protected])Car.RemoveReferences([email protected])Marker.Disable([email protected])wait 2500 Model.Destroy(#PIZZABOY)Model.Destroy(#WMYPIZZ)jump @PIZZA_18

 

 

EDIT: If you far from the pizza location he wont come to you how can i fix that???

Edited by matanyehoshua1
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.