LastS 7 Posted November 7, 2018 Hello, i would like to know how to do that vehicles spawn repaired, or set what items are damaged Thanks! 1 Share this post Link to post Share on other sites
Guest Posted November 8, 2018 void SpawnVehicle( string vehicle, TStringArray attachments) { Car oCar = Car.Cast( GetGame().CreateObject( vehicle, GetCursorPos(), false, false ) ); for (int j = 0; j < attachments.Count(); j++) { oCar.GetInventory().CreateAttachment( attachments.Get(j) ); } oCar.Fill( CarFluid.FUEL, 1000 ); oCar.Fill( CarFluid.OIL, 1000 ); oCar.Fill( CarFluid.BRAKE, 1000 ); oCar.Fill( CarFluid.COOLANT, 1000 ); oCar.SwitchLights(); } void SpawnHatchback() { TStringArray attArr = { "HatchbackWheel","HatchbackWheel","HatchbackWheel","HatchbackWheel", "CarBattery","CarRadiator","EngineBelt","SparkPlug","HatchbackHood", "HatchbackTrunk","HatchbackDoors_Driver","HatchbackDoors_CoDriver", }; SpawnVehicle( "OffroadHatchback", attArr ); } Share this post Link to post Share on other sites
DannyDog 532 Posted November 9, 2018 If you want the car to start with it's engine on do oCar.EngineStart(); after you fill everything. Also the script Ruslan posted is directly taken from community offline. Share this post Link to post Share on other sites
nimartin 1 Posted November 10, 2018 Hey guys Where is the file that I put this into? Thanks Share this post Link to post Share on other sites
Mostabdel 1 Posted February 16, 2019 Who can tell me what is mean this ? Fill( CarFluid.FUEL, 50 ); Fill( CarFluid.COOLANT, 6.0 ); Fill( CarFluid.OIL, 4.0 ); Share this post Link to post Share on other sites