Jump to content
Racey66

init.c issues

Recommended Posts

Hi

We added the following to our init.c but when we do so the server wont start. the items were created in offline mode and are either vanilla items or items from mods we have loaded on the server. Can anyone help as to why the server wont start?

//Your custom spawned objects
SpawnObject( "Land_Mil_Barracks6", "12133.400391 140.000000 12688.500000", "-157.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12226.900391 140.000000 12649.200195", "-157.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12179.700195 140.000000 12669.000000", "-157.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12232.700195 140.000000 12616.900391", "-64.300011 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12105.400391 140.000000 12672.000000", "111.300011 0.000000 0.000000" );
SpawnObject( "Land_Bunker1_Double", "12205.200195 141.203995 12666.200195", "22.500002 0.000000 0.000000" );
SpawnObject( "Land_Bunker1_Double", "12158.299805 141.203995 12685.000000", "22.500002 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12156.599609 142.423004 12681.900391", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12203.900391 142.695999 12662.599609", "22.500002 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12251.700195 141.059998 12638.900391", "-6.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12108.799805 141.059998 12698.099609", "-119.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12107.500000 142.326004 12699.700195", "-32.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12250.200195 141.123001 12638.400391", "-101.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12076.599609 140.011993 12575.799805", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12122.799805 140.011993 12556.900391", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12202.299805 140.100006 12524.900391", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12250.000000 140.100006 12505.200195", "21.999998 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12189.500000 140.755005 12882.299805", "57.000004 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12244.099609 140.628998 12577.400391", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12240.000000 140.628998 12576.400391", "-134.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Watchtower", "12241.299805 142.069000 12580.400391", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12236.799805 140.559006 12579.700195", "45.999996 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12258.799805 140.755005 12611.500000", "-86.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12258.000000 140.755005 12628.799805", "-105.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12265.500000 140.755005 12620.000000", "-94.000000 -1.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12257.500000 140.755005 12601.799805", "-78.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12260.299805 140.755005 12593.900391", "-75.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12253.700195 140.755005 12589.799805", "-65.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12253.599609 140.755005 12580.099609", "-54.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12245.500000 140.755005 12576.000000", "-45.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12247.299805 140.559006 12580.500000", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12245.400391 140.628998 12583.799805", "45.999996 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12236.500000 140.628998 12583.099609", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12239.900391 140.559006 12586.299805", "-44.000000 1.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_curve", "12231.500000 140.757996 12564.000000", "-137.998993 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12231.099609 140.000000 12567.700195", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12228.000000 140.000000 12564.200195", "-45.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "12249.900391 140.832001 12571.099609", "-91.000015 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp1", "12264.799805 141.162003 12620.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12254.000000 140.559006 12616.599609", "-91.000015 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12250.799805 140.559006 12600.099609", "-57.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11862.599609 141.367996 12564.900391", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11844.299805 141.367996 12573.599609", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11822.599609 141.367996 12583.500000", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks5", "11878.200195 145.925003 12550.099609", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Big", "12072.299805 140.998001 12619.400391", "86.000000 0.000000 0.000000" );
SpawnObject( "Land_Misc_Well_Pump_Blue", "12190.200195 140.585999 12609.099609", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Misc_RoadBarrier", "12230.799805 140.578003 12576.900391", "-134.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12228.900391 140.000000 12570.000000", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12226.700195 140.000000 12572.200195", "-44.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_Table", "12224.299805 140.399994 12572.700195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblocks_long", "12221.000000 140.688004 12570.700195", "136.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblock", "12219.400391 140.343002 12573.700195", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12099.500000 140.298004 12675.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12225.900391 140.298004 12569.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12225.599609 140.927002 12569.099609", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12072.000000 141.059998 12666.500000", "-162.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12069.400391 140.559006 12660.099609", "-81.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12072.400391 140.559006 12674.200195", "-70.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12065.400391 140.755005 12618.099609", "-97.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12058.799805 140.839005 12623.700195", "83.000099 -2.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12058.000000 140.841995 12637.400391", "-87.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12063.500000 140.339005 12630.799805", "-81.999992 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12064.599609 140.755005 12643.799805", "-85.000008 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12060.000000 140.755005 12651.299805", "-81.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12061.799805 140.755005 12662.299805", "-79.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12064.799805 140.755005 12673.799805", "-70.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12076.299805 140.755005 12681.599609", "-56.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12071.299805 140.755005 12684.000000", "-49.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12081.500000 140.755005 12693.400391", "-36.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12089.299805 140.755005 12693.299805", "-31.000002 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12096.500000 140.755005 12697.400391", "-31.000002 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12073.700195 141.072998 12666.700195", "11.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_curve", "12224.299805 140.757996 12566.299805", "-50.000004 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12253.200195 141.059998 12608.099609", "14.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12251.400391 141.123001 12609.400391", "13.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12226.000000 141.123001 12567.599609", "47.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12224.799805 140.298004 12569.400391", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "12077.400391 141.598999 12595.299805", "-97.000000 -5.000000 59.000000" );
SpawnObject( "bldr_wreck_bmp1", "12083.099609 141.162003 12600.000000", "45.999996 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp1", "12023.500000 141.162003 12589.599609", "42.000000 0.000000 0.000000" );
SpawnObject( "bldr_Misc_RoadBarrier", "12079.299805 140.578003 12610.900391", "176.999985 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblock", "12079.500000 140.343002 12604.200195", "-14.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblock", "12077.799805 140.343002 12601.900391", "-122.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks3", "11902.500000 142.199997 12545.500000", "114.000000 0.000000 0.000000" );
SpawnObject( "bldr_Decal_Heli_Army", "11914.099609 140.000000 12601.299805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Decal_Heli_Army", "12031.400391 140.000000 12471.700195", "-4.000000 -3.000000 -3.000000" );
SpawnObject( "Wreck_Mi8", "12031.400391 141.697998 12473.400391", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big3", "12004.099609 141.171005 12485.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11999.200195 140.000000 12494.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_2", "11992.000000 141.996994 12485.000000", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Medical_Tent_Shower", "12011.000000 141.572006 12478.000000", "25.000002 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_2", "11982.599609 141.996994 12489.200195", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big3", "11976.599609 141.171005 12498.400391", "-157.000000 0.000000 0.000000" );
SpawnObject( "bldr_Statue_General", "12145.400391 142.029007 12630.799805", "-158.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12008.099609 140.628998 12512.400391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12002.799805 140.628998 12514.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11997.500000 140.628998 12516.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11987.000000 140.628998 12521.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11981.700195 140.628998 12523.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11976.500000 140.628998 12525.700195", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "11972.299805 140.559006 12527.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "11968.000000 140.559006 12520.200195", "-68.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11969.799805 140.628998 12524.599609", "-67.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12013.400391 140.628998 12510.000000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12023.099609 140.628998 12505.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12028.299805 140.628998 12503.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12033.599609 140.628998 12501.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12038.799805 140.628998 12498.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12046.799805 140.626007 12493.200195", "-115.999992 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12051.099609 140.559006 12485.500000", "66.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12052.900391 140.457001 12477.400391", "-83.000000 0.000000 -4.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Big", "12051.000000 140.998001 12463.400391", "-64.000008 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12040.799805 140.626007 12454.000000", "-34.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12033.000000 140.559006 12449.200195", "-20.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12023.599609 140.626007 12448.200195", "14.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12018.099609 140.628998 12449.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12013.000000 140.628998 12452.200195", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Small", "12007.599609 140.983994 12452.200195", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12004.099609 140.628998 12456.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11998.799805 140.628998 12458.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11990.299805 140.628998 12462.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11985.000000 140.628998 12464.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11979.799805 140.628998 12467.200195", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11970.799805 140.628998 12471.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11965.599609 140.628998 12473.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "11961.500000 140.559006 12475.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11987.500000 140.000000 12472.099609", "-157.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11969.900391 140.000000 12479.900391", "-157.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11982.200195 140.000000 12515.400391", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12006.099609 140.000000 12505.799805", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Uaz", "11990.599609 140.843002 12521.000000", "-52.999996 0.000000 0.000000" );
SpawnObject( "bldr_wreck_powgen", "12015.099609 140.783997 12484.599609", "-65.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_trailer_cistern", "11987.599609 140.000000 12494.299805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_ural", "12005.799805 141.190994 12516.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_brdm", "11951.200195 140.546997 12508.200195", "112.999992 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "11950.500000 140.832001 12533.900391", "145.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_ural", "11969.599609 141.190994 12514.400391", "-73.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile2", "11973.799805 140.255997 12522.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile5", "12006.099609 140.000000 12470.599609", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12290.099609 140.000000 12541.599609", "156.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12313.500000 140.000000 12514.799805", "-179.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_reinforcedtank2_shelter1", "12292.099609 141.223007 12521.599609", "-40.999996 0.000000 0.000000" );
SpawnObject( "Land_DieselPowerPlant_Tank_Small", "12300.799805 144.792999 12527.799805", "147.000015 0.000000 0.000000" );
SpawnObject( "bldr_mil_reinforcedtank2_shelter2", "12295.299805 141.328995 12520.200195", "48.000004 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "12225.599609 141.339996 12600.400391", "29.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "12202.000000 141.339996 12655.700195", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "12154.500000 141.339996 12675.599609", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "12111.500000 141.339996 12686.799805", "21.999998 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile6", "12234.200195 140.000000 12637.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12205.900391 140.776993 12653.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Open", "12234.500000 140.733002 12636.000000", "-28.000004 -73.999992 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12158.599609 140.776993 12673.400391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12115.900391 140.776993 12686.400391", "-65.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_t72_chassis", "12176.000000 140.779999 12606.000000", "-25.000002 0.000000 0.000000" );
SpawnObject( "bldr_wreck_t72_turret", "12175.099609 141.617004 12604.500000", "-119.000000 -10.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "12427.799805 145.184006 12433.099609", "-110.000000 2.000000 12.000002" );
SpawnObject( "bldr_Cemetery_Grave4", "12408.299805 139.968994 12435.400391", "-101.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_Grave4", "12408.799805 139.968994 12433.500000", "-101.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_Grave4", "12409.299805 139.968994 12431.500000", "-101.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_SmallCross", "12409.099609 140.457993 12435.700195", "80.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_SmallCross", "12409.900391 140.457993 12431.799805", "80.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_SmallCross", "12409.400391 140.457993 12433.700195", "80.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_GuardBox_Green", "12496.599609 142.326996 12519.400391", "-56.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12474.200195 141.798004 12508.500000", "-172.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_ural", "12454.799805 141.682007 12537.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp1", "12489.599609 141.757004 12526.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "12454.299805 141.337997 12518.900391", "-86.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_brdm", "12453.400391 141.018997 12512.700195", "-78.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ATC_Small", "12362.000000 150.181000 12356.599609", "-69.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_radar_mobile_base", "12438.900391 140.020996 12335.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_radar_mobile_head", "12438.700195 143.947998 12334.700195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_radar_mobile_generator", "12432.200195 140.932999 12336.000000", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Airfield_HQ", "12329.700195 145.792999 12372.099609", "-69.000000 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "12317.900391 141.339996 12376.599609", "111.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Open", "12343.900391 140.733002 12374.000000", "0.000000 -72.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile2", "12344.200195 140.255997 12374.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12346.099609 140.776993 12373.400391", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "12355.900391 141.339996 12365.299805", "-69.000000 0.000000 0.000000" );
SpawnObject( "Land_Bunker2_Double", "12343.500000 141.210999 12349.299805", "-161.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_roof_east", "12344.099609 142.335999 12351.299805", "18.000000 0.000000 0.000000" );
SpawnObject( "bldr_flag_chernarus_pole", "12335.599609 149.100998 12378.700195", "-69.000000 -1.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12310.000000 141.227997 12385.200195", "-157.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_big_east", "12308.900391 142.983994 12383.599609", "-150.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_roof_east", "12012.900391 141.423004 12480.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_big_east", "12053.099609 142.248001 12463.099609", "130.000000 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11899.200195 141.339996 12534.500000", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11857.400391 141.339996 12553.700195", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11839.000000 141.339996 12562.599609", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11817.200195 141.339005 12572.400391", "25.000002 0.000000 0.000000" );
SpawnObject( "Land_Misc_Well_Pump_Blue", "11862.200195 140.686005 12589.000000", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "11873.400391 141.339996 12533.599609", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "11895.299805 140.776993 12537.299805", "-118.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "11861.099609 140.776993 12552.799805", "-62.000198 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "11842.700195 140.776993 12562.000000", "-62.000004 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile2", "11822.700195 140.255997 12569.500000", "-42.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Open", "11821.599609 140.785995 12570.700195", "136.000000 -78.999992 0.000000" );
SpawnObject( "Land_Wreck_V3S", "11895.200195 141.602997 12544.599609", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Uaz", "11899.599609 140.843002 12571.500000", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Dead_MassGrave_15m", "12202.700195 137.938995 12361.500000", "12.999999 8.000001 0.000000" );
SpawnObject( "bldr_Dead_MassGrave_15m", "12184.799805 137.957993 12366.500000", "12.999999 8.000001 0.000000" );
SpawnObject( "bldr_wreck_digger", "12176.299805 141.947998 12377.599609", "83.000000 1.000000 4.000000" );
 

Share this post


Link to post
Share on other sites

search on google Add custom objects to your server or mission the first result gives you instructions of github.com 😁

 

You need this for your custom objects

//Spawn helper function
void SpawnObject( string type, vector position, vector orientation )
{
    auto obj = GetGame().CreateObject( type, position );
    obj.SetPosition( position );
    obj.SetOrientation( orientation );
    vector roll = obj.GetOrientation();
    roll [ 2 ] = roll [ 2 ] - 1;
    obj.SetOrientation( roll );
    roll [ 2 ] = roll [ 2 ] + 1;
    obj.SetOrientation( roll );
}
void main()
{
 //Your custom spawned objects
SpawnObject( "Land_Wreck_Uaz", "11899.599609 140.843002 12571.500000", "0.000000 0.000000 0.000000" );

 

Test this init.c

void SpawnObject( string type, vector position, vector orientation )
{
    auto obj = GetGame().CreateObject( type, position );
    obj.SetPosition( position );
    obj.SetOrientation( orientation );
    vector roll = obj.GetOrientation();
    roll [ 2 ] = roll [ 2 ] - 1;
    obj.SetOrientation( roll );
    roll [ 2 ] = roll [ 2 ] + 1;
    obj.SetOrientation( roll );
}
void main()
{
 //Your custom spawned objects
SpawnObject( "Land_Mil_Barracks6", "12133.400391 140.000000 12688.500000", "-157.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12226.900391 140.000000 12649.200195", "-157.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12179.700195 140.000000 12669.000000", "-157.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12232.700195 140.000000 12616.900391", "-64.300011 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12105.400391 140.000000 12672.000000", "111.300011 0.000000 0.000000" );
SpawnObject( "Land_Bunker1_Double", "12205.200195 141.203995 12666.200195", "22.500002 0.000000 0.000000" );
SpawnObject( "Land_Bunker1_Double", "12158.299805 141.203995 12685.000000", "22.500002 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12156.599609 142.423004 12681.900391", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12203.900391 142.695999 12662.599609", "22.500002 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12251.700195 141.059998 12638.900391", "-6.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12108.799805 141.059998 12698.099609", "-119.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12107.500000 142.326004 12699.700195", "-32.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12250.200195 141.123001 12638.400391", "-101.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12076.599609 140.011993 12575.799805", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12122.799805 140.011993 12556.900391", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12202.299805 140.100006 12524.900391", "21.999998 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12250.000000 140.100006 12505.200195", "21.999998 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12189.500000 140.755005 12882.299805", "57.000004 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12244.099609 140.628998 12577.400391", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12240.000000 140.628998 12576.400391", "-134.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Watchtower", "12241.299805 142.069000 12580.400391", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12236.799805 140.559006 12579.700195", "45.999996 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12258.799805 140.755005 12611.500000", "-86.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12258.000000 140.755005 12628.799805", "-105.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12265.500000 140.755005 12620.000000", "-94.000000 -1.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12257.500000 140.755005 12601.799805", "-78.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12260.299805 140.755005 12593.900391", "-75.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12253.700195 140.755005 12589.799805", "-65.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12253.599609 140.755005 12580.099609", "-54.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12245.500000 140.755005 12576.000000", "-45.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12247.299805 140.559006 12580.500000", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12245.400391 140.628998 12583.799805", "45.999996 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12236.500000 140.628998 12583.099609", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12239.900391 140.559006 12586.299805", "-44.000000 1.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_curve", "12231.500000 140.757996 12564.000000", "-137.998993 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12231.099609 140.000000 12567.700195", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12228.000000 140.000000 12564.200195", "-45.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "12249.900391 140.832001 12571.099609", "-91.000015 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp1", "12264.799805 141.162003 12620.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12254.000000 140.559006 12616.599609", "-91.000015 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12250.799805 140.559006 12600.099609", "-57.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11862.599609 141.367996 12564.900391", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11844.299805 141.367996 12573.599609", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11822.599609 141.367996 12583.500000", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks5", "11878.200195 145.925003 12550.099609", "-65.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Big", "12072.299805 140.998001 12619.400391", "86.000000 0.000000 0.000000" );
SpawnObject( "Land_Misc_Well_Pump_Blue", "12190.200195 140.585999 12609.099609", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Misc_RoadBarrier", "12230.799805 140.578003 12576.900391", "-134.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12228.900391 140.000000 12570.000000", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_long", "12226.700195 140.000000 12572.200195", "-44.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_Table", "12224.299805 140.399994 12572.700195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblocks_long", "12221.000000 140.688004 12570.700195", "136.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblock", "12219.400391 140.343002 12573.700195", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12099.500000 140.298004 12675.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12225.900391 140.298004 12569.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12225.599609 140.927002 12569.099609", "-44.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12072.000000 141.059998 12666.500000", "-162.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12069.400391 140.559006 12660.099609", "-81.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12072.400391 140.559006 12674.200195", "-70.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12065.400391 140.755005 12618.099609", "-97.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12058.799805 140.839005 12623.700195", "83.000099 -2.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12058.000000 140.841995 12637.400391", "-87.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12063.500000 140.339005 12630.799805", "-81.999992 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12064.599609 140.755005 12643.799805", "-85.000008 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12060.000000 140.755005 12651.299805", "-81.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12061.799805 140.755005 12662.299805", "-79.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12064.799805 140.755005 12673.799805", "-70.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12076.299805 140.755005 12681.599609", "-56.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12071.299805 140.755005 12684.000000", "-49.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12081.500000 140.755005 12693.400391", "-36.000000 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12089.299805 140.755005 12693.299805", "-31.000002 0.000000 0.000000" );
SpawnObject( "bldr_misc_razorwire", "12096.500000 140.755005 12697.400391", "-31.000002 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12073.700195 141.072998 12666.700195", "11.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_bags_curve", "12224.299805 140.757996 12566.299805", "-50.000004 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_pillbox", "12253.200195 141.059998 12608.099609", "14.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12251.400391 141.123001 12609.400391", "13.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12226.000000 141.123001 12567.599609", "47.000000 0.000000 0.000000" );
SpawnObject( "Land_Roadblock_WoodenCrate", "12224.799805 140.298004 12569.400391", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "12077.400391 141.598999 12595.299805", "-97.000000 -5.000000 59.000000" );
SpawnObject( "bldr_wreck_bmp1", "12083.099609 141.162003 12600.000000", "45.999996 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp1", "12023.500000 141.162003 12589.599609", "42.000000 0.000000 0.000000" );
SpawnObject( "bldr_Misc_RoadBarrier", "12079.299805 140.578003 12610.900391", "176.999985 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblock", "12079.500000 140.343002 12604.200195", "-14.000000 0.000000 0.000000" );
SpawnObject( "bldr_roadblock_cncblock", "12077.799805 140.343002 12601.900391", "-122.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks3", "11902.500000 142.199997 12545.500000", "114.000000 0.000000 0.000000" );
SpawnObject( "bldr_Decal_Heli_Army", "11914.099609 140.000000 12601.299805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Decal_Heli_Army", "12031.400391 140.000000 12471.700195", "-4.000000 -3.000000 -3.000000" );
SpawnObject( "Wreck_Mi8", "12031.400391 141.697998 12473.400391", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big3", "12004.099609 141.171005 12485.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11999.200195 140.000000 12494.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_2", "11992.000000 141.996994 12485.000000", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Medical_Tent_Shower", "12011.000000 141.572006 12478.000000", "25.000002 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_2", "11982.599609 141.996994 12489.200195", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big3", "11976.599609 141.171005 12498.400391", "-157.000000 0.000000 0.000000" );
SpawnObject( "bldr_Statue_General", "12145.400391 142.029007 12630.799805", "-158.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12008.099609 140.628998 12512.400391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12002.799805 140.628998 12514.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11997.500000 140.628998 12516.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11987.000000 140.628998 12521.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11981.700195 140.628998 12523.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11976.500000 140.628998 12525.700195", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "11972.299805 140.559006 12527.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "11968.000000 140.559006 12520.200195", "-68.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11969.799805 140.628998 12524.599609", "-67.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12013.400391 140.628998 12510.000000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12023.099609 140.628998 12505.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12028.299805 140.628998 12503.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12033.599609 140.628998 12501.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12038.799805 140.628998 12498.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12046.799805 140.626007 12493.200195", "-115.999992 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12051.099609 140.559006 12485.500000", "66.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12052.900391 140.457001 12477.400391", "-83.000000 0.000000 -4.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Big", "12051.000000 140.998001 12463.400391", "-64.000008 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12040.799805 140.626007 12454.000000", "-34.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "12033.000000 140.559006 12449.200195", "-20.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_round", "12023.599609 140.626007 12448.200195", "14.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12018.099609 140.628998 12449.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12013.000000 140.628998 12452.200195", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Small", "12007.599609 140.983994 12452.200195", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "12004.099609 140.628998 12456.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11998.799805 140.628998 12458.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11990.299805 140.628998 12462.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11985.000000 140.628998 12464.900391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11979.799805 140.628998 12467.200195", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11970.799805 140.628998 12471.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_6m", "11965.599609 140.628998 12473.500000", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_hbarrier_4m", "11961.500000 140.559006 12475.299805", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11987.500000 140.000000 12472.099609", "-157.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11969.900391 140.000000 12479.900391", "-157.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "11982.200195 140.000000 12515.400391", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12006.099609 140.000000 12505.799805", "24.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Uaz", "11990.599609 140.843002 12521.000000", "-52.999996 0.000000 0.000000" );
SpawnObject( "bldr_wreck_powgen", "12015.099609 140.783997 12484.599609", "-65.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_trailer_cistern", "11987.599609 140.000000 12494.299805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_ural", "12005.799805 141.190994 12516.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_brdm", "11951.200195 140.546997 12508.200195", "112.999992 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "11950.500000 140.832001 12533.900391", "145.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_ural", "11969.599609 141.190994 12514.400391", "-73.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile2", "11973.799805 140.255997 12522.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile5", "12006.099609 140.000000 12470.599609", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12290.099609 140.000000 12541.599609", "156.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12313.500000 140.000000 12514.799805", "-179.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_reinforcedtank2_shelter1", "12292.099609 141.223007 12521.599609", "-40.999996 0.000000 0.000000" );
SpawnObject( "Land_DieselPowerPlant_Tank_Small", "12300.799805 144.792999 12527.799805", "147.000015 0.000000 0.000000" );
SpawnObject( "bldr_mil_reinforcedtank2_shelter2", "12295.299805 141.328995 12520.200195", "48.000004 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "12225.599609 141.339996 12600.400391", "29.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "12202.000000 141.339996 12655.700195", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "12154.500000 141.339996 12675.599609", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "12111.500000 141.339996 12686.799805", "21.999998 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile6", "12234.200195 140.000000 12637.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12205.900391 140.776993 12653.599609", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Open", "12234.500000 140.733002 12636.000000", "-28.000004 -73.999992 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12158.599609 140.776993 12673.400391", "24.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12115.900391 140.776993 12686.400391", "-65.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_t72_chassis", "12176.000000 140.779999 12606.000000", "-25.000002 0.000000 0.000000" );
SpawnObject( "bldr_wreck_t72_turret", "12175.099609 141.617004 12604.500000", "-119.000000 -10.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "12427.799805 145.184006 12433.099609", "-110.000000 2.000000 12.000002" );
SpawnObject( "bldr_Cemetery_Grave4", "12408.299805 139.968994 12435.400391", "-101.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_Grave4", "12408.799805 139.968994 12433.500000", "-101.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_Grave4", "12409.299805 139.968994 12431.500000", "-101.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_SmallCross", "12409.099609 140.457993 12435.700195", "80.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_SmallCross", "12409.900391 140.457993 12431.799805", "80.000000 0.000000 0.000000" );
SpawnObject( "bldr_Cemetery_SmallCross", "12409.400391 140.457993 12433.700195", "80.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_GuardBox_Green", "12496.599609 142.326996 12519.400391", "-56.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12474.200195 141.798004 12508.500000", "-172.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_ural", "12454.799805 141.682007 12537.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp1", "12489.599609 141.757004 12526.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_bmp2", "12454.299805 141.337997 12518.900391", "-86.000000 0.000000 0.000000" );
SpawnObject( "bldr_wreck_brdm", "12453.400391 141.018997 12512.700195", "-78.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ATC_Small", "12362.000000 150.181000 12356.599609", "-69.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_radar_mobile_base", "12438.900391 140.020996 12335.200195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_radar_mobile_head", "12438.700195 143.947998 12334.700195", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_radar_mobile_generator", "12432.200195 140.932999 12336.000000", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Airfield_HQ", "12329.700195 145.792999 12372.099609", "-69.000000 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "12317.900391 141.339996 12376.599609", "111.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Open", "12343.900391 140.733002 12374.000000", "0.000000 -72.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile2", "12344.200195 140.255997 12374.799805", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "12346.099609 140.776993 12373.400391", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "12355.900391 141.339996 12365.299805", "-69.000000 0.000000 0.000000" );
SpawnObject( "Land_Bunker2_Double", "12343.500000 141.210999 12349.299805", "-161.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_roof_east", "12344.099609 142.335999 12351.299805", "18.000000 0.000000 0.000000" );
SpawnObject( "bldr_flag_chernarus_pole", "12335.599609 149.100998 12378.700195", "-69.000000 -1.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12310.000000 141.227997 12385.200195", "-157.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_big_east", "12308.900391 142.983994 12383.599609", "-150.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_roof_east", "12012.900391 141.423004 12480.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "bldr_mil_camonet_big_east", "12053.099609 142.248001 12463.099609", "130.000000 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11899.200195 141.339996 12534.500000", "22.999998 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11857.400391 141.339996 12553.700195", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11839.000000 141.339996 12562.599609", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_rusty", "11817.200195 141.339005 12572.400391", "25.000002 0.000000 0.000000" );
SpawnObject( "Land_Misc_Well_Pump_Blue", "11862.200195 140.686005 12589.000000", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_tank_small_white", "11873.400391 141.339996 12533.599609", "25.000002 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "11895.299805 140.776993 12537.299805", "-118.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "11861.099609 140.776993 12552.799805", "-62.000198 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Closed", "11842.700195 140.776993 12562.000000", "-62.000004 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Pile2", "11822.700195 140.255997 12569.500000", "-42.000000 0.000000 0.000000" );
SpawnObject( "bldr_Garbage_Container2_Open", "11821.599609 140.785995 12570.700195", "136.000000 -78.999992 0.000000" );
SpawnObject( "Land_Wreck_V3S", "11895.200195 141.602997 12544.599609", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Uaz", "11899.599609 140.843002 12571.500000", "0.000000 0.000000 0.000000" );
SpawnObject( "bldr_Dead_MassGrave_15m", "12202.700195 137.938995 12361.500000", "12.999999 8.000001 0.000000" );
SpawnObject( "bldr_Dead_MassGrave_15m", "12184.799805 137.957993 12366.500000", "12.999999 8.000001 0.000000" );
SpawnObject( "bldr_wreck_digger", "12176.299805 141.947998 12377.599609", "83.000000 1.000000 4.000000" );


    //INIT WEATHER BEFORE ECONOMY INIT------------------------
    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false);    // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.02, 0.1), 1, 0);
    weather.GetRain().Set( 0, 1, 0);
    weather.GetFog().Set( 0, 1, 0);

    //INIT ECONOMY--------------------------------------
    Hive ce = CreateHive();
    if ( ce )
        ce.InitOffline();

    //DATE RESET AFTER ECONOMY INIT-------------------------
    int year, month, day, hour, minute;
    int reset_month = 8, reset_day = 10;
    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))
    {
        GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
    }
    else
    {
        if ((month == reset_month + 1) && (day > reset_day))
        {
            GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
        }
        else
        {
            if ((month < reset_month) || (month > reset_month + 1))
            {
                GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
            }
        }
    }
}

class CustomMission: MissionServer
{
    void SetRandomHealth(EntityAI itemEnt)
    {
        if ( itemEnt )
        {
            int rndHlt = Math.RandomInt(55,100);
            itemEnt.SetHealth("","",rndHlt);
        }
    }

    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
    {
        Entity playerEnt;
        playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
        Class.CastTo(m_player, playerEnt);

        GetGame().SelectPlayer(identity, m_player);

        return m_player;
    }

    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
    {
        EntityAI itemTop;
        EntityAI itemEnt;
        ItemBase itemBs;
        float rand;

        itemTop = player.FindAttachmentBySlotName("Body");

        if ( itemTop )
        {
            itemEnt = itemTop.GetInventory().CreateInInventory("Rag");
            if ( Class.CastTo(itemBs, itemEnt ) )
                itemBs.SetQuantity(4);

            SetRandomHealth(itemEnt);

            string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
            int rndIndex = Math.RandomInt(0, 4);
            itemEnt = itemTop.GetInventory().CreateInInventory(chemlightArray[rndIndex]);
            SetRandomHealth(itemEnt);
        }
    }
};

Mission CreateCustomMission(string path)
{
    return new CustomMission();
}

 

Edited by Mexx82

Share this post


Link to post
Share on other sites

Thanks for that, we do have a working init.c file but its only when we add the above items to it does the server fail to start, remove them and it all goes fine, just wondered if there was anything obvious in those items, currently we list a whole load of things to spawn in using the init.c file and they work fine. We were just wondering if there is a limit or is there a better way to add lots of spawned items apart from adding them to te init.c file?

Share this post


Link to post
Share on other sites

This is how I add custom objects to init.c

First I created a folder called "Scripts" in "dayzOffline.chernarusplus" where I put one file for each area of objects I want to spawn, so I don't mix them up with the other server files.

Each file in this folder looks like this:

void SpawnTestObjects()
{
    SpawnObject( "Land_Mil_Barracks6", "12133.400391 140.000000 12688.500000", "-157.500000 0.000000 0.000000" );
    SpawnObject( "Land_Mil_Barracks6", "12226.900391 140.000000 12649.200195", "-157.500000 0.000000 0.000000" );
    ...
    ...
    rest of SpawnObject calls goes here
    ...
    ...
}

As you can see I've created a function called SpawnTestObjects to enclose all the calls to the SpawnObject function. This function can be called whatever, as long as it's unique. I name it to reflect the name of the area I want to spawn objects in, like SpawnTraderCamp() or SpawnBarracksOnNEAF(). In this example I called it SpawnTestObjects() and included all your lines without modifying them. I usually name the file the same as the name of the function that creates the actual objects, like SpawnTestObjects.c.

Then I include the above file at the top of init.c with the line below:

#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnTestObjects.c"

I also put the SpawnObject() code for actually spawning the objects in a separate file as well, hence the inclusion of the file SpawnHelper.c in the code in my complete init.c below. This is of course not necessary. You can keep it in init.c if you want, but I kind of like to not get that file cluttered with custom code.

Then further below, at the end of the main() function (it probably can be anywhere within the main function, but this is where I put it) I execute the code for creating my custom objects by calling the function I created to enclose those lines:

SpawnTestObjects();

 

This is my complete init.c file:

#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnHelper.c"				// The code for actually spawning the objects.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnTraderCamp.c"			// Spawn trader objects.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnTraderFunfair.c"		// Some more trader objects.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnTraderPrison.c"		// Lots of traders.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnBalotaNostalgia.c"		// Old tents in Balota.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnTestObjects.c"			// Racey66's objects up for testing.

void main()
{
    //INIT WEATHER BEFORE ECONOMY INIT------------------------
    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false);    // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);
    weather.GetRain().Set( 0, 0, 1);
    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    //INIT ECONOMY--------------------------------------
    Hive ce = CreateHive();
    if ( ce )
        ce.InitOffline();

    //DATE RESET AFTER ECONOMY INIT-------------------------
    int year, month, day, hour, minute;
    int reset_month = 9, reset_day = 20;
    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))
    {
        GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
    }
    else
    {
        if ((month == reset_month + 1) && (day > reset_day))
        {
            GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
        }
        else
        {
            if ((month < reset_month) || (month > reset_month + 1))
            {
                GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
            }
        }
    }
    
    // Spawn custom objects here. Here I call the functions in the above included files to have them spawned.
    SpawnTraderCamp();
    SpawnTraderFunfair();
    SpawnTraderPrison();
    SpawnBalotaNostalgia();    
    SpawnTestObjects();

    //GetCEApi().ExportProxyData( "7500 0 7500", 10000 );  // This line populate the new objects with loot, but that's a whole other story how that works.
}
      
class CustomMission: MissionServer
{
      ...
      Rest of this class code here. I only put it in as a reference.
      ...
}

Your code seems to work fine. It spawned buildings and tents at the North East Airfield. Also a statue:

TgGfT2s.jpg

As for a limit on how many objects you can spawn, I don't know, but it seems unlikely. In total I have 909 lines of custom code calling for an object to be spawned via init.c, and it works just fine. Maybe you have tons more, but I doubt it should matter. Except for effecting server performance after a while if it keeps adding up. But it should at least start.

By the way, here is the code I use to spawn objects (SpawnHelper.c):

void SpawnObject(string objectName, vector position, vector orientation)
{
    Object obj;
    obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));
    obj.SetPosition(position);
    obj.SetOrientation(orientation);
 
    // Force update collisions
    if (obj.CanAffectPathgraph())
    {
        obj.SetAffectPathgraph(true, false);
        GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);
    }
}

I have seen a couple of variants of this code. Not exactly sure what it all does, but this one works for me. Got it from a trader mod I downloaded a while back.

Edited by NoBeansForMe
Added code for spawning objects.

Share this post


Link to post
Share on other sites

@NoBeansForMe

I see you have custom weather defined in your init.c file.  Is that actually working on 1.07?  For instance, if you set those values to all zeroes, will you never have rain or is it the case that the server is overriding your settings?  I've been hit or miss with weather lately, so curious as to your results with the settings you have here.

 

Share this post


Link to post
Share on other sites

Hi NoBeans, have followed your instructions and thanks for the help, i now get a compile error in my init.c (117) unexpected statement SpawnBiathlon, could you look at my enclosed init.c and see where ive gone wrong please?

//Converts Steam IDs for referencing lower down in file this one
string GUID; 
string player1;
string player2;
string player3;
string player4;
string player5;
string player6;
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SpawnHelper.c"                // The code for actually spawning the objects.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\Biathlon.c"            // Spawn trader objects.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\BlackMarket.c"        // Some more trader objects.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\CostalLights.c"        // Lots of traders.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\CostalTrader.c"        // Old tents in Balota.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\CustomBanking.c"            // Racey66's objects up for testing.
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\GMLights.c"    
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\GMSigns.c"    
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\KSigns.c"    
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\NEAF.c"    
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\PrisonBridge.c"    
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\SkaliskyBridge.c"    
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\Scripts\\TheMaze.c"    
    


void main()
{
    //INIT WEATHER BEFORE ECONOMY INIT------------------------
    Weather weather = g_Game.GetWeather();
//
    weather.MissionWeather(false);    // false = use weather controller from Weather.c
//
    weather.GetOvercast().SetLimits( 0.0 , 1.0 );

//limits of clouds at any point in time. Valued between 0.0 and 1.0.

//( 1.0 , 1.0 ); max cloud all the time

//( 0.0 , 0.0 ); no clouds ever

//( 0.0 , 1.0 ); between no clouds and max clouds

//( 0.5 , 0.5 ); always half clouds

//you have to test with clouds on highest in video settings to test well

weather.GetRain().SetLimits( 0.0 , 1.0 );

weather.GetFog().SetLimits( 0.0 , 0.25 );

//Section B - Change limits
weather.GetOvercast().SetForecastChangeLimits( 0.0, 1.0 );

//limits of how much clouds change over time

//( 1.0 , 1.0 ); clouds change 1.0 or -1.0 within time limits from Section C

//( 0.0 , 0.0 ); clouds never change

//( 0.0 , 1.0 ); clouds change between -1.0 and 1.0 within time limits from Section C

//( 0.5 , 0.5 ); clouds change -0.5 or 0.5 within time limits from Section C

//values can never go outside of limits set in Section A

weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );

weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );

//Section C - Time limits
weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );

//limits how long it takes for clouds to change in seconds

//( 1800 , 1800 ); clouds take 1800 seconds to change by a value set in Section B

//( 1 , 1800 ); clouds take between 1 and 1800 seconds to change by a value set in Section B

//( 1 , 1 ); clouds take 1 second to change by a value set in Section B

weather.GetRain().SetForecastTimeLimits( 600 , 600 );

weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );

//Section D - Session weather intensity values
weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);

//when the server starts it's session the intensity of clouds is equal to a number with a 6-7 decimal precision within 0.0 and 0.3

//you can change Math.RandomFloatInclusive(0.0, 0.3) to just a value

//for example: weather.GetOvercast().Set( 0.5, 0, 0);

//the server session's cloud intensity will be 0.5 on that session. It's still subject to change over time because of Section B and C, but the lower this value, the less of an impact the values in Section A B and C have

weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);

weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);

//Section E - Wind settings
weather.SetWindMaximumSpeed(15);

//Maximum windspeed ever

weather.SetWindFunctionParams(0.1, 0.3, 50);

    //INIT ECONOMY--------------------------------------
    Hive ce = CreateHive();
    if ( ce )
        ce.InitOffline();


    //DATE RESET AFTER ECONOMY INIT-------------------------
    int year, month, day, hour, minute;
    int reset_month = 9, reset_day = 20;
    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))
    {
        GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
    }
    else
    {
        if ((month == reset_month + 1) && (day > reset_day))
        {
            GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
        }
        else
        {
            if ((month < reset_month) || (month > reset_month + 1))
            {
                GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
            }
        }
    }
}
 // Spawn custom objects here. Here I call the functions in the above included files to have them spawned.
    SpawnBiathlon();
    SpawnBlackMarket();
    SpawnCostalLights();
    SpawnCostalSigns();    
    SpawnCostalTraders();
    SpawnCustomBanking();
    SpawnGMLights();
    SpawnGMSigns();
    SpawnKSigns();
    SpawnNEAF();
    SpawnPrisonBridge();
    SpawnSkaliskyBridge();
    SpawnTheMaze();
    

    //GetCEApi().ExportProxyData( "7500 0 7500", 10000 );  // This line populate the new objects with loot, but that's a whole other story how that works.
    }
class CustomMission: MissionServer
{
    void SetRandomHealth(EntityAI itemEnt)
    {
        if ( itemEnt )
        {
            int rndHlt = Math.RandomInt(100,100);
            itemEnt.SetHealth("100","100",rndHlt);
        }
    }

        override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
    {
        
        Entity playerEnt;
        PlayerBase player = (PlayerBase) playerEnt;
        GUID = player.GetIdentity().GetPlainId();//Steam 64
        player1 = "XXXXXXXXXXXXXXXX";//Owen
        player2 = "XXXXXXXXXXXXXXXX";//
        player3 = "XXXXXXXXXXXXXXXX";//
        player4 = "XXXXXXXXXXXXXXXX";//
        player5 = "XXXXXXXXXXXXXXXX";//
        
        if (GUID==player1)
        {
            playerEnt = GetGame().CreatePlayer(identity, characterName, "2774.92 26.052 1278.62", 0, "NONE");//Creates random player
        }
        else if (GUID==player2)
        {
            playerEnt = GetGame().CreatePlayer(identity, characterName, "2774.92 26.052 1278.62", 0, "NONE");//Creates random player
        }
        else if (GUID==player3)
        {
            playerEnt = GetGame().CreatePlayer(identity, characterName, "2774.92 26.052 1278.62", 0, "NONE");//Creates random player
        }
        else if (GUID==player4)
        {
            playerEnt = GetGame().CreatePlayer(identity, characterName, "2774.92 26.052 1278.62", 0, "NONE");//Creates random player
        }
        else if (GUID==player5)
        {
            playerEnt = GetGame().CreatePlayer(identity, characterName, "2774.92 26.052 1278.62", 0, "NONE");//Creates random player
        }
        else
        {
            playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
        }
        
        Class.CastTo(m_player, playerEnt);
        
        GetGame().SelectPlayer(identity, m_player);
        
        return m_player;
    }
    
    
    
    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
    {
        player.RemoveAllItems();
        
        //This is the spawn items for everyone
//        itemEnt = player.GetInventory().CreateInInventory("KillerBadgers_AliceBag");

/*        
        player.RemoveAllItems();

        EntityAI item = player.GetInventory().CreateInInventory(topsMissionArray.GetRandomElement());
        EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
        EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
*/
        EntityAI itemTop;
        EntityAI itemEnt;
        ItemBase itemBs;
        float rand;
        GUID = player.GetIdentity().GetPlainId();//Steam 64
        player1 = "76561198061703835";//Owen
        player2 = "76561198060474777";//Racey
        player3 = "76561198306743858";//fuzion
        player4 = "76561198328835301";//Bull
        player5 = "76561198828710899";//
        itemEnt = player.GetInventory().CreateInInventory("KillerBadgers_TTsKOJacket");
        itemEnt = player.GetInventory().CreateInInventory("KillerBadgers_TTSKOPants");
        itemEnt = player.GetInventory().CreateInInventory("TTSKOBoots");
        

        
        if(GUID == player1)
        {
            player.RemoveAllItems();
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Vest");
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Boots");
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Mask");
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Gloves");
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Helmet");
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Pants");
            itemEnt = player.GetInventory().CreateInInventory("AE_STAR_Jacket");
            itemEnt = player.GetInventory().CreateInInventory("MSFC_ADMIN_GUN2");
            itemEnt = player.GetInventory().CreateInInventory("MSFC_ADMIN_GUN2_MAG999");
            itemEnt = player.GetInventory().CreateInInventory("MSFC_ADMIN_GUN2_MAG999");
            itemEnt = player.GetInventory().CreateInInventory("M4_Suppressor");
            itemEnt = player.GetInventory().CreateInInventory("FP4_HK_416_Buttstock");
            itemEnt = player.GetInventory().CreateInInventory("M9A1_Bayonet");
            itemEnt = player.GetInventory().CreateInInventory("UniversalLight");
            itemEnt = player.GetInventory().CreateInInventory("Battery9V");
            itemEnt = player.GetInventory().CreateInInventory("TAGn_admin");
            itemEnt = player.GetInventory().CreateInInventory("admin_Hatchet");
            itemEnt = player.GetInventory().CreateInInventory("M4_RISHndgrd");    
            itemEnt = player.GetInventory().CreateInInventory("ACOGOptic");    
            itemEnt = player.GetInventory().CreateInInventory("Megaphone");
            itemEnt = player.GetInventory().CreateInInventory("Battery9V");
            itemEnt = player.GetInventory().CreateInInventory("Shovel");
        }
        else if(GUID==player2)
        {
            player.RemoveAllItems();
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Vest");
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Boots");
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Mask");
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Gloves");
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Helmet");
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Pants");
            itemEnt = player.GetInventory().CreateInInventory("AE_BLACK_Jacket");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_GUN");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AK_Suppressor");
            itemEnt = player.GetInventory().CreateInInventory("AK_PlasticBttstck_Black");
            itemEnt = player.GetInventory().CreateInInventory("FP4_AK_Bayonet_BLACK");
            itemEnt = player.GetInventory().CreateInInventory("UniversalLight");
            itemEnt = player.GetInventory().CreateInInventory("Battery9V");
            itemEnt = player.GetInventory().CreateInInventory("TAGn_admin");
            itemEnt = player.GetInventory().CreateInInventory("admin_Hatchet");
            itemEnt = player.GetInventory().CreateInInventory("AK_RailHndgrd_Black");
            itemEnt = player.GetInventory().CreateInInventory("KobraOptic");
            itemEnt = player.GetInventory().CreateInInventory("PSO1Optic");
        }
        else if(GUID==player3)
        {
            player.RemoveAllItems();
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Vest");
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Boots");
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Mask");
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Gloves");
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Helmet");
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Pants");
            itemEnt = player.GetInventory().CreateInInventory("AE_GOLD_Jacket");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_GUN");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AE_ADMIN_MAG");
            itemEnt = player.GetInventory().CreateInInventory("AK_Suppressor");
            itemEnt = player.GetInventory().CreateInInventory("AK_PlasticBttstck_Black");
            itemEnt = player.GetInventory().CreateInInventory("FP4_AK_Bayonet_BLACK");
            itemEnt = player.GetInventory().CreateInInventory("UniversalLight");
            itemEnt = player.GetInventory().CreateInInventory("Battery9V");
            itemEnt = player.GetInventory().CreateInInventory("TAGn_admin");
            itemEnt = player.GetInventory().CreateInInventory("admin_Hatchet");
            itemEnt = player.GetInventory().CreateInInventory("AK_RailHndgrd_Black");
            itemEnt = player.GetInventory().CreateInInventory("KobraOptic");
            itemEnt = player.GetInventory().CreateInInventory("PSO1Optic");
            
        }
        else if(GUID==player4)
        {
            itemEnt = player.GetInventory().CreateInInventory("TAGn_admin");
        }
        else if(GUID==player5)
        {
            itemEnt = player.GetInventory().CreateInInventory("ACOGOptic");
            itemBs = ItemBase.Cast(itemEnt);
            //SetHealth(itemEnt, 20);
            SetRandomHealth(itemEnt);
           
            itemEnt = player.GetInventory().CreateInInventory("Rag");
            itemBs = ItemBase.Cast(itemEnt);
            itemBs.SetQuantity(4);
            SetRandomHealth(itemEnt);
               
            itemEnt = player.GetInventory().CreateInInventory("M4A1_Green");
            itemBs = ItemBase.Cast(itemEnt);
            SetRandomHealth(itemEnt);
            
            itemEnt = player.GetInventory().CreateInInventory("M4_CQBBttstck");
            itemBs = ItemBase.Cast(itemEnt);
            SetRandomHealth(itemEnt);
            
            itemEnt = player.GetInventory().CreateInInventory("M4_RISHndgrd_Green");
            itemBs = ItemBase.Cast(itemEnt);
            SetRandomHealth(itemEnt);
            
            itemEnt = player.GetInventory().CreateInInventory("Mag_STANAG_30Rnd");
            itemBs = ItemBase.Cast(itemEnt);
            itemBs.SetQuantity(3);
            SetRandomHealth(itemEnt);
                    
        }
        
        //This is the spawn items for everyone
        itemTop = player.FindAttachmentBySlotName("Body");
        
        if ( itemTop )
        {
            itemEnt = itemTop.GetInventory().CreateInInventory("Rag");
            if ( Class.CastTo(itemBs, itemEnt ) )
                itemBs.SetQuantity(4);
        
            string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
            int rndIndex = Math.RandomInt(0, 4);
            itemEnt = itemTop.GetInventory().CreateInInventory(chemlightArray[rndIndex]);
            SetRandomHealth(itemEnt);

        }
            
        rand = Math.RandomFloatInclusive(0.0, 1.0);
        if ( rand < 0.25 )
            itemEnt = itemTop.GetInventory().CreateInInventory("MonsterEnergy1");
        else if ( rand > 0.75 )
            itemEnt = itemTop.GetInventory().CreateInInventory("MonsterEnergy2");
        else
            itemEnt = itemTop.GetInventory().CreateInInventory("MonsterEnergy3");
        
        SetRandomHealth(itemEnt);

        rand = Math.RandomFloatInclusive(0.0, 1.0);
        if ( rand < 0.35 )
            itemEnt = itemTop.GetInventory().CreateInInventory("BakedBeansCan");
        else if ( rand > 0.65 )
            itemEnt = itemTop.GetInventory().CreateInInventory("PeachesCan");
        else
            itemEnt = itemTop.GetInventory().CreateInInventory("fruitcocktailCan");
        
        SetRandomHealth(itemEnt);
        itemEnt = itemTop.GetInventory().CreateInInventory("StoneKnife");
    }
};

Mission CreateCustomMission(string path)
{
    return new CustomMission();
}

Share this post


Link to post
Share on other sites
34 minutes ago, drgullen said:

@NoBeansForMe

I see you have custom weather defined in your init.c file.  Is that actually working on 1.07?  For instance, if you set those values to all zeroes, will you never have rain or is it the case that the server is overriding your settings?  I've been hit or miss with weather lately, so curious as to your results with the settings you have here.

 

We cannot get the weather to work at all, its frustrating to say the least

Share this post


Link to post
Share on other sites

@NoBeansForMe Update, if i use your init.c with my file names substituted, i get a compile error multiple declaration of function 'SpawnObject'

Share this post


Link to post
Share on other sites
55 minutes ago, Racey66 said:

@NoBeansForMe Update, if i use your init.c with my file names substituted, i get a compile error multiple declaration of function 'SpawnObject'

It looks like you have placed the code outside the main() function, just below it. I pasted your init.c into Notepad++ to make it easier to see the structure, and the starting bracket "{" after void main() doesn't seem to have a closing "}" to form a valid section of code for the function, so to speak. I have three closing "}" above the code below in my init.c, and you have four. And I can't find any code inside the main() function that would require that forth ending "}". Remove the one just above the line "// Spawn custom objects here. Here I call the functions in the above included files to have them spawned." and the rest of the code will be inside of the main() function.

 // Spawn custom objects here. Here I call the functions in the above included files to have them spawned.
    SpawnBiathlon();
    SpawnBlackMarket();
    SpawnCostalLights();
    SpawnCostalSigns();    
    SpawnCostalTraders();
    SpawnCustomBanking();
    SpawnGMLights();
    SpawnGMSigns();
    SpawnKSigns();
    SpawnNEAF();
    SpawnPrisonBridge();
    SpawnSkaliskyBridge();
    SpawnTheMaze();
    

    //GetCEApi().ExportProxyData( "7500 0 7500", 10000 );  // This line populate the new objects with loot, but that's a whole other story how that works.

I can't tell if this will solve your errors, there is a lot going on inside your init.c, but it's a good start. I have no way of testing your init.c either, since it includes a lot of code that I don't have.

All I can recommend is to replace the code in steps. Don't do it all at once. Start with a working init.c and then move code out to their own files one "section" at a time. That way you will know what code modification broke the server if you suddenly get an error.

Share this post


Link to post
Share on other sites
2 hours ago, drgullen said:

@NoBeansForMe

I see you have custom weather defined in your init.c file.  Is that actually working on 1.07?  For instance, if you set those values to all zeroes, will you never have rain or is it the case that the server is overriding your settings?  I've been hit or miss with weather lately, so curious as to your results with the settings you have here.

 

I haven't modified the weather code in init.c. Are you sure you have the latest one? I always verify my local files when a new version of DayZ is released. I don't really play on my server, I just use it for testing scripts and occasionally some modding. Then I move the things I've created out of the server files into my backups for future usage and restore the server to it's original state.

I haven't really noticed what kind of weather I have when I do play a bit on my server. My sessions usually never last very long. Just start it up, test some code and then restart etc.

Share this post


Link to post
Share on other sites

@NoBeansForMe Finally got it working to a degree, and we cant thank you enough,just one problem you might shed some light on? The CostalSigns.c have exactly the same information in them as our online server init.c, same co-ordinates etc. We are still running the old init.c file with all the spawns listed actually in the file and they spawn in correctly,yet on my test server where im running your ideas, they dont spawn in at all, it's so baffling. My test server has the same mods, that load in the same order.

Share this post


Link to post
Share on other sites
5 hours ago, Racey66 said:

@NoBeansForMe Finally got it working to a degree, and we cant thank you enough,just one problem you might shed some light on? The CostalSigns.c have exactly the same information in them as our online server init.c, same co-ordinates etc. We are still running the old init.c file with all the spawns listed actually in the file and they spawn in correctly,yet on my test server where im running your ideas, they dont spawn in at all, it's so baffling. My test server has the same mods, that load in the same order.

@Racey66 It's really hard to say. I'd make sure the file inclusion works correctly. Remove all code in it and replace it with something that for sure will render an output. Even put in an error in the code to at least get a sign the server is reading the file by getting an error message. Or maybe remove all other inclusions to the rest of the files and only keep CostalSigns.c until you get it working. Then put back the other ones again, one by one even.

Edited by NoBeansForMe

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×