Sanmodder Posted December 19, 2018 Share Posted December 19, 2018 see i struggling with this function to create a vehicle you can help me everytime crash game , no matter what changes I make what this is about I want to create a swatvan vehicle on the street see {$CLEO .cs} 0000: thread '9999999999' repeat wait 0 until if player.Defined(0) 04C4: store_coords_to 19@ 29@ 30@ from_actor $PLAYER_ACTOR with_offset 0.0 -999.0 8.0 0AA5: call_function_return 0x420B10 num_params 3 pop 3 19@ 29@ 30@ store_to 0@ 0AA7: call_function 0x431F80 num_params 3 pop 3 modelid #swatvan [email protected] MissionCleanUpFlag 1 end_thread //source by plugin-sdk-master { CVector::CVector(float X, float Y, float Z) ((void(__thiscall *)(CVector *, float, float, float))0x420B10)(this, X, Y, Z); } { CVehicle* CCarCtrl::CreateCarForScript(int modelid, CVector posn, unsigned char MissionCleanUpFlag) { return plugin::CallAndReturn<CVehicle*, 0x431F80, int, CVector, unsigned char>(modelid, posn, MissionCleanUpFlag); } see scr.log results ******************************************** script 9999999 Local variables dump: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 538979811 538979811 ******************************************** 00000025&0: [00D6] IF 0 00000029&0: [0256] IS_PLAYER_PLAYING 0 // TRUE 00000033&1: [004D] GOTO_IF_FALSE -21 00000040&1: [04C4] COMMAND_04C4 1 0.0 -999.0 8.0 -> 1153132826 -994116973 1101988207 00000069&1: [0AA7] CALL_FUNCTION_RETURN 0x420B10 3 3 1153132826 -994116973 1101988207 -> 1153132826 00000093&1: [0AA5] CALL_FUNCTION //--------------------------------------------------------------------------------- and look at it I managed to do the first time what is this this function creates 1 peds in the car very unique function because how a police car creates a policeman and how an ordinary car is a normal 1 peds Advantages note I do not load a model full of automaton you do not have to check the actor c++ { CPed* CPopulation::AddPedInCar(CVehicle* vehicle, bool driver, int gangPedType, int seatNumber, bool male, bool criminal) { return ((CPed* (__cdecl *)(CVehicle*, bool, int, int, bool, bool))0x613A00)(vehicle, driver, gangPedType, seatNumber, male, criminal); } cleo 0A97: 7@ = car veh struct // player car or scaned other if not 7@ == 0x0 //error block --> 0x0 crash then 0AA5: call {add ped} 0x613A00 {or add cop} {0x41C070} num_params 6 pop 6 driver false gangPedType 6 seatNumber 1 male false criminal false CVehicle 7@ end and here, see how to control such peds because there is no handle 0AA5: call {add ped} 0x613A00 {or add cop} {0x41C070} num_params 6 pop 6 driver false gangPedType 6 seatNumber 0 male false criminal false CVehicle 7@ 0432: _handler_3 = get_actor_handle_from_car veh passenger_seat 0 if _handler_3 >= 1000 //error block -100 crash jf @continue_11 if 056D: actor _handler_3 defined then if not Actor.HasWeapon(_handler_3, 29) then Actor.GiveWeaponAndAmmo(_handler_3, 29, 999999) end end :continue_11 end if _handler_3 >= 1000 //error block -100 crash jf @continue_12 if 056D: actor _handler_3 defined then if 0449: actor _handler_3 in_a_car then 0713: actor _handler_3 driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 150.0 8 1 firing_rate 100 end end :continue_12 Link to comment Share on other sites More sharing options...
Sanmodder Posted December 20, 2018 Author Share Posted December 20, 2018 maybe if you do not want to help me or you do not know it may help me with this I need information where I can find the name of the texture to make a military swatvan you know the name txd because in the original location nothing has this vehicle has only one color I need to change it to a military one Well, now I'll tell you what I'm doing I do such a path improving the wanted level you know, e.g. policemen get new occupants in vehicles only ordinary cops Possibility of setting whether to shoot from cars or not the possibility of setting the weapon for example, bike cops city cops fbi army swat np. I did that with 4 stars set off in a chase behind the player armored swatvan armored cars with minigun on the roof of the vehicle + two swat in the middle of the vehicle with mp5 so to the climate of the game the cars are on indexes, no, for example, you set one swatwan car max 13 but it is worth mentioning that carl at 2 swatvan has no chance or with 6 stars, the different pilots are approached to the player's position and release 4 commandos on the ropes you know, like swat, with 4 stars but this is random for example, rd 1 helicopter is on the commando lines rd 2 commandos are firing from a helicopter I still plan to do it with 5 stars fbi agents will fly in black helicopters as snipers 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