Bobymatar Posted November 6, 2016 Share Posted November 6, 2016 Begin create car and loading path success but when it landing on airport and it still standing not move or delete car just standing... I want it when end patch car remove or delete . Here is code {$CLEO .cs}thread 'AI_HYDRA'9@ = 0 //transmitter7@ = -1 //plane8@ = -1 //actor10@ = -1 //plane marker11@ = -1 //pathID12@ = -1 //pathDetector27@ = -1 //long angle26@ = -1 //long coord25@ = -1 //long coord24@ = -1 //long coord 0@ = -1 //coord1@ = -1 //coord2@ = -1 //coord3@ = -1 //temp value4@ = -1 //angle5@ = -1 //health6@ = -1 //speed :startwait 0ifPlayer.Defined($PLAYER_CHAR)jf @start :avawait 10ifModel.Available(#HYDRA)jf @loadwait 10ifModel.Available(#ARMY)jf @load1jump @available :loadModel.Load(#HYDRA)wait 10jump @ava :load1Model.Load(#ARMY)wait 10jump @ava :availableCar.Create(7@, #HYDRA, 2530.5134 -2928.3928 25.6647)Car.Angle(7@) = 94.21170129: 8@ = create_actor_pedtype 4 model #ARMY in_car 7@ driverseatwait 2000008E6: set_plane 7@ landing_gear 0 020A: set_car 7@ door_status_to 4Model.Destroy(#ARMY)Model.Destroy(#HYDRA) :TEST_411@ = 90112@ = 027@ = 94.211726@ = 2530.513425@ = -2928.392824@ = 25.6647if9@ == 1jf @loadpath0ACE: show_formatted_text_box "HYDRA 2"Marker.CreateAboveaCTOR(10@, 8@)Marker.SetColor(10@, 2)jf @endCar.PutAt(7@,27@,26@,25@,24@) :loadpathwait 10if 07C1: path 11@ availablejf @loadpath1jump @movingon :loadpath107C0: load_path 11@wait 10jump @loadpath :movingon05EB: assign_car 7@ to_path 11@0873: release_path 11@if9@ == 1jf @checks0ACE: show_formatted_text_box "HYDRA" :checksgosub @deadgosub @transmitgosub @landinggearif and860E: not car 7@ assigned_to_path860E: not car 7@ assigned_to_pathjf @checks :release06C5: release_car 7@ from_path12@ += 1if0029: 12@ >= 3 :putatgosub @deadgosub @transmit3@ += 1 26@ += -0.525@ += -0.5Car.Angle(7@) = [email protected](7@, 26@, 25@, 24@)00EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_carCar.PutAt(7@,27@,26@,25@,24@)if 3@ == 170jf @putat gosub @angle jump @loadpath :landinggearCar.StorePos(7@, 0@, 1@, 2@)if2@ >= 50.0jf @landinggear108E6: set_plane 7@ landing_gear 1return :landinggear108E6: set_plane 7@ landing_gear 000EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_carCar.PutAt(7@,27@,26@,25@,24@)return :angle3@ = 0 :angle2gosub @deadgosub @transmit 000B: 27@ += 1.0000A: 3@ += 1Car.Angle(7@) = [email protected](7@, 26@, 25@, 24@)00EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_carCar.PutAt(7@,27@,26@,25@,24@)if 3@ >= 180 else_jump @angle23@ = 0return :deadwait 0if andnot 7@ == -1not 8@ == -1jf @endeif andnot Car.Wrecked(7@)0185: car 7@ health >= 250not Actor.Dead(8@)Actor.InCar(8@, 7@)jf @endreturn :end00EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_carCar.PutAt(7@,27@,26@,25@,24@)jump @start :endeMarker.Disable(10@)Actor.RemoveReferences(8@)Car.RemoveReferences(7@)jump @start :transmitif0ADC: test_cheat "HYDRA"if9@ == 09@ = 1Marker.CreateAboveActor(10@, 8@)Marker.SetColor(10@, 2)0ACE: show_formatted_text_box "HYDRA 2 da cat canh"00EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_carCar.PutAt(7@,27@,26@,25@,24@)wait 19000jump @start Link to comment https://gtaforums.com/topic/872894-someone-edit-code-help-me/ Share on other sites More sharing options...
ZAZ Posted November 6, 2016 Share Posted November 6, 2016 Big mistake: You made gosub to subscripts but leads the code out from subscript into main script read here about gosub So consider that a subscript must end by return your code: gosub @dead :deadwait 0if andnot 7@ == -1not 8@ == -1jf @ende// <----- here it goes to label :endeif andnot Car.Wrecked(7@)0185: car 7@ health >= 250not Actor.Dead(8@)Actor.InCar(8@, 7@)jf @end// <----- here it goes to label :endreturn :end00EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_carCar.PutAt(7@,27@,26@,25@,24@)jump @start// <--------- here it leaves the subscript and goes to main script :endeMarker.Disable(10@)Actor.RemoveReferences(8@)Car.RemoveReferences(7@)jump @start// <--------- here it leaves the subscript and goes to main script--- Also did you made invalid conditional checks: this is a conditional code but the else_jump is missing 00EE: actor 8@ sphere 0 near_point 2650.4478 -2972.7573 24.1562 radius 10.0 10.0 in_cari could find it at 5 positions---- please correct first the mistakes before you ask again for help Link to comment https://gtaforums.com/topic/872894-someone-edit-code-help-me/#findComment-1069195791 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