Jump to content

Dr.Nymphoz

Members
  • Content Count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dr.Nymphoz

  • Rank
    On the Coast
  1. Dr.Nymphoz

    Respawn a vehicle

    Hello everyone, may anyone help here? How can i respawn a vehicle that was spawned on server by script in init.c ? i need something like this parameter <restock>30</restock>. My script to spawn a vehicle on server: void spawnVehicle(string type, vector position) { EntityAI car = GetGame().CreateObject(type, position); car.SetPosition(position); autoptr array<string> m_Attachments = { "HeadlightH7","HeadlightH7","SparkPlug","CarBattery","CarRadiator","EngineBelt", "CivSedanDoors_Driver","CivSedanDoors_CoDriver","CivSedanDoors_BackLeft","CivSedanDoors_BackRight","CivSedanHood","CivSedanTrunk", "CivSedanWheel","CivSedanWheel","CivSedanWheel","CivSedanWheel"}; if (car) foreach (string att : m_Attachments) car.GetInventory().CreateAttachment(att); auto carfluids = Car.Cast( car ); carfluids.Fill( CarFluid.FUEL, 100 ); carfluids.Fill( CarFluid.OIL, 1000 ); carfluids.Fill( CarFluid.BRAKE, 1000 ); carfluids.Fill( CarFluid.COOLANT, 1000 ); } void main() { //VEHICLE spawnVehicle( "CivilianSedan", "8742.036133 8.230740 2331.631104"); spawnVehicle( "CivilianSedan", "8877.351563 9.299133 2257.636230"); } i would use a vehicle spawn with "cfgspawnabletypes.xml" without scripts but i don't know how to spawn a vehicle with full fuel not using a script... (sorry for my poor english).
×