Mitorafer Posted August 19, 2009 Share Posted August 19, 2009 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 More sharing options...
PatrickW Posted August 19, 2009 Share Posted August 19, 2009 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 . There are other weird things in your code, but I guess this is the one that causes the crash. Link to comment Share on other sites More sharing options...
Mitorafer Posted August 19, 2009 Author Share Posted August 19, 2009 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 . 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 More sharing options...
PatrickW Posted August 19, 2009 Share Posted August 19, 2009 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. Link to comment Share on other sites More sharing options...
Mitorafer Posted August 19, 2009 Author Share Posted August 19, 2009 (edited) 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 August 26, 2009 by matanyehoshua1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now