Diegoti Posted November 1, 2018 Share Posted November 1, 2018 (edited) 073E: get_car_in_sphere -1577.942 52.6333 16.3281 radius 4.0 model #INFO handle_as $TEMPVAR_ACTOR_CAR How does this code works?? Hello, im currently working on a script that creates a group of taxies with drives in x areas for my other taxi script and i want to destroy every taxi in that area and after create new ones, I just want to know to get every taxi in X Y Z area pls Edited November 1, 2018 by Diegoti Link to comment Share on other sites More sharing options...
In45do Posted November 1, 2018 Share Posted November 1, 2018 51 minutes ago, Diegoti said: I just want to know to get every taxi in X Y Z area pls {$CLEO .cs} thread 'get taxi' :Taxi wait 0 if 0256: player $PLAYER_CHAR defined jf @Taxi 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] 073E: get_car_in_sphere [email protected] [email protected] [email protected] radius 4.0 model #TAXI handle_as [email protected] if 056E: car [email protected] defined jf @Cabbie // do something with Taxi :Cabbie 073E: get_car_in_sphere [email protected] [email protected] [email protected] radius 4.0 model #CABBIE handle_as [email protected] if 056E: car [email protected] defined jf @Taxi // do something with Cabbie Link to comment Share on other sites More sharing options...
Diegoti Posted November 1, 2018 Author Share Posted November 1, 2018 (edited) Nop 073E: get_car_in_sphere 2081.2925 1003.4913 10.4634 radius 10.0 model #TAXI handle_as [email protected] Car.Destroy([email protected]) S O L V E D 0AE2: [email protected] = random_vehicle_near_point 2081.2925 1003.4913 10.4634 in_radius 10.0 find_next 0 pass_wrecked 1 if 056E: car [email protected] defined then Car.Destroy([email protected]) end Edited November 1, 2018 by Diegoti Link to comment Share on other sites More sharing options...
In45do Posted November 1, 2018 Share Posted November 1, 2018 Don't forget to check if detected car is taxi with opcode 0137. Otherwise the street would be empty. 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