cosme Posted August 24, 2021 Share Posted August 24, 2021 hi, does anyone know how i can attach a ped to a car? (i'm not very good at using sanny builder) Link to comment Share on other sites More sharing options...
ZAZ Posted August 24, 2021 Share Posted August 24, 2021 yes, it's called "put_actor into_turret_on_car" 2 different opcodes 0464: put_actor $PLAYER_ACTOR into_turret_on_car 6@ at_car_offset -0.2 0.5 0.0 position 0 shooting_angle_limit 0.0 with_weapon 0 06A7: put_actor $PLAYER_ACTOR into_turret_on_car 6@ at_car_offset -0.2 0.5 0.0 position 1 shooting_angle 110.0 70.0 with_weapon 43 cosme 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
cosme Posted August 24, 2021 Author Share Posted August 24, 2021 hello again, sorry for so many questions but that OPCODE where should I write it? I recently downloaded a script that you shared in a post (NPC CAR ON CARREC) and wanted to spawn a car next to an npc that shoots me while driving // This file was decompiled using SASCM.ini published on 2021-07-05 {$CLEO .cs} script_name 'NPCAREC' [email protected] = 411 [email protected] = 234 [email protected] = 900 :NPCAREC_35 wait 0 if Player.Defined($PLAYER_CHAR) jf @NPCAREC_175 077E: get_active_interior_to [email protected] if and [email protected] == 0 is_key_pressed 9 is_key_pressed 81 jf @NPCAREC_175 gosub @NPCAREC_182 wait 500 05EB: assign_car [email protected] to_path [email protected] TIMERB = 0 :NPCAREC_113 Player.Defined($PLAYER_CHAR) jf @NPCAREC_163 wait 0 if or is_key_pressed 48 860E: not car [email protected] assigned_to_path jf @NPCAREC_156 jump @NPCAREC_163 :NPCAREC_156 jump @NPCAREC_113 :NPCAREC_163 gosub @NPCAREC_293 wait 1000 :NPCAREC_175 jump @NPCAREC_35 :NPCAREC_182 Model.Load([email protected]) Model.Load([email protected]) 07C0: load_path [email protected] 038B: load_requested_models 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 8.0 1.2 Car.Create([email protected], [email protected], [email protected], [email protected], [email protected]) Car.Health([email protected]) = 20000 Actor.CreateAsDriver([email protected], PedType.Mission1, [email protected], [email protected]) Marker.CreateAboveCar([email protected], [email protected]) 018B: set_marker [email protected] radar_mode 2 Model.Destroy([email protected]) Model.Destroy([email protected]) return :NPCAREC_293 0873: release_path [email protected] Marker.Disable([email protected]) Actor.DestroyInstantly([email protected]) Car.Destroy([email protected]) return Link to comment Share on other sites More sharing options...
ZAZ Posted August 25, 2021 Share Posted August 25, 2021 19 hours ago, cosme said: I wanted to spawn a car next to an npc that shoots me while driving in this case you should know that there's another code that let npc do driveby action when he's placed on passenger seat or driver seat 0713: actor 5@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 300.0 8 0 firing_rate 100 it looks better, but then he can only use pistol or micro_uzi using other weapons needs to put_actor into_turret_on_car CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
cosme Posted August 26, 2021 Author Share Posted August 26, 2021 Hello, thanks for answering, I was testing what you said but put "put_actor into_turret_on_car" press tab + q the car appears only with its driver (remember I am doing a mission with dyom and its path cleo). I don't know what I'm doing wrong, I'll need to see more tutorials :NPCAREC_190 Model.Load([email protected]) Model.Load([email protected]) Model.Load([email protected]) 0464: put_actor [email protected] into_turret_on_car [email protected] at_car_offset [email protected] [email protected] [email protected] position 0 shooting_angle_limit 0.0 with_weapon 0 07C0: load_path [email protected] 038B: load_requested_models 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 8.0 1.2 Car.Create([email protected], [email protected], [email protected], [email protected], [email protected]) Car.Health([email protected]) = 20000 Actor.CreateAsDriver([email protected], PedType.Mission1, [email protected], [email protected]) Marker.CreateAboveCar([email protected], [email protected]) 018B: set_marker [email protected] radar_mode 2 Model.Destroy([email protected]) Model.Destroy([email protected]) Model.Destroy([email protected]) return Link to comment Share on other sites More sharing options...
ZAZ Posted August 26, 2021 Share Posted August 26, 2021 It needs to create the actor first and also it needs to give him a weapon I made 2 scripts 1. first one spawns actor and put him into_turret_on_car with AK47 2. the other script place actor on passenger seat and let him do driveby action with micro_uzi Spoiler actor into_turret_on_car with AK47 {$CLEO .cs} :NPC_CAR_ON_CARREC_PATH thread 'NPCAREC' 1@ = 411// infernus // < --- vehicle model ID 2@ = 234// SWMOCD // < --- ped model ID 3@ = 900 // < --- carrec path while true wait 0 if 0256: player $PLAYER_CHAR defined then 077E: get_active_interior_to 0@ if and 0@ == 0 0AB0: key_pressed 9// tab key 0AB0: key_pressed 81// q key then gosub @carspawn wait 500 05EB: assign_car 4@ to_path 3@ 33@ = 0 while Player.Defined($PLAYER_CHAR) wait 0 if or 0AB0: key_pressed 48// 0 key (ZERO) 860E: not car 4@ assigned_to_path then break end end //00BA: show_text_styled GXT 'fem_off' time 1000 style 4 gosub @cleanup wait 1000 end end end :carspawn 0247: request_model 1@ 0247: request_model 2@ 0247: request_model #AK47 07C0: load_path 3@ 038B: load_requested_models 04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 8.0 1.2 00A5: 4@ = create_car 1@ at 11@ 12@ 13@ 0224: set_car 4@ health_to 20000 0129: 5@ = create_actor 24 2@ in_car 4@ driverseat 0186: 6@ = create_marker_above_car 4@ 018B: set_marker 6@ radar_mode 2 009A: 7@ = create_actor 24 2@ at 11@ 12@ -53.5 01B2: give_actor 7@ weapon 30 ammo 9999 02E2: set_actor 7@ weapon_accuracy_to 100 0464: put_actor 7@ into_turret_on_car 4@ at_car_offset 0.0 -2.5 1.0 position 0 shooting_angle_limit 360.0 with_weapon 30 05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR 0249: release_model 1@ 0249: release_model 2@ return :cleanup 0873: release_path 3@ 0164: disable_marker 6@ 009B: destroy_actor 7@ 009B: destroy_actor 5@ 00A6: destroy_car 4@ return Spoiler actor on passenger seat does driveby action with micro_uzi {$CLEO .cs} :NPC_CAR_ON_CARREC_PATH thread 'NPCAREC' 1@ = 411// infernus // < --- vehicle model ID 2@ = 234// SWMOCD // < --- ped model ID 3@ = 900 // < --- carrec path while true wait 0 if 0256: player $PLAYER_CHAR defined then 077E: get_active_interior_to 0@ if and 0@ == 0 0AB0: key_pressed 9// tab key 0AB0: key_pressed 81// q key then gosub @carspawn wait 500 05EB: assign_car 4@ to_path 3@ 33@ = 0 while Player.Defined($PLAYER_CHAR) wait 0 if or 0AB0: key_pressed 48// 0 key (ZERO) 860E: not car 4@ assigned_to_path then break end end //00BA: show_text_styled GXT 'fem_off' time 1000 style 4 gosub @cleanup wait 1000 end end end :carspawn 0247: request_model 1@ 0247: request_model 2@ 0247: request_model #MICRO_UZI 07C0: load_path 3@ 038B: load_requested_models 04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 0.0 8.0 1.2 00A5: 4@ = create_car 1@ at 11@ 12@ 13@ 0224: set_car 4@ health_to 20000 0129: 5@ = create_actor 24 2@ in_car 4@ driverseat 0186: 6@ = create_marker_above_car 4@ 018B: set_marker 6@ radar_mode 2 01C8: 7@ = create_actor_pedtype 24 model 2@ in_car 4@ passenger_seat 0 01B2: give_actor 7@ weapon 28 ammo 9999 02E2: set_actor 7@ weapon_accuracy_to 100 0713: actor 7@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 300.0 8 0 firing_rate 100 0249: release_model 1@ 0249: release_model 2@ return :cleanup 0873: release_path 3@ 0164: disable_marker 6@ 009B: destroy_actor 7@ 009B: destroy_actor 5@ 00A6: destroy_car 4@ return CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
cosme Posted August 26, 2021 Author Share Posted August 26, 2021 Oh thank you very much 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