Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.32 KB | None | 0 0
  1. void main()
  2. {
  3. // Spawn my custom buildings
  4. AddBuildings();
  5. }
  6. #define DISABLE_PERSISTENCY
  7. #include "$CurrentDir:Missions\\DayZCommunityOfflineMode.Enoch\\core\\BaseModuleInclude.c"
  8.  
  9. Mission CreateCustomMission(string path)
  10. {
  11. if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
  12. return new CommunityOfflineServer();
  13.  
  14. return new CommunityOfflineClient();
  15. }
  16.  
  17. void SpawnObject(string objectName, vector position, vector orientation)
  18. {
  19. Object obj;
  20. obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));
  21. obj.SetPosition(position);
  22. obj.SetOrientation(orientation);
  23. //Force collision update
  24. vector roll = obj.GetOrientation();
  25. roll [ 2 ] = roll [ 2 ] - 1;
  26. obj.SetOrientation( roll );
  27. roll [ 2 ] = roll [ 2 ] + 1;
  28. obj.SetOrientation( roll );
  29.  
  30. // Force update collisions
  31. if (obj.CanAffectPathgraph())
  32. {
  33. obj.SetAffectPathgraph(true, false);
  34. GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);
  35. }
  36. }
  37. void AddBuildings()
  38. {
  39. SpawnObject( "Land_Mil_GuardHouse3", "7663.994629 176.640549 11483.275391", "13.957829 -0.901720 -1.199533" );
  40. SpawnObject( "Land_Misc_Greenhouse", "7658.904297 176.871613 11473.099609", "40.043903 -0.914603 -2.748466" );
  41. SpawnObject( "Land_Misc_TrailRoof_Small", "7635.425293 176.495728 11499.032227", "37.079014 -1.645804 -2.749251" );
  42. SpawnObject( "Land_Misc_Well_Pump_Blue", "7662.869629 175.432098 11489.352539", "-126.821129 -4.293137 -2.388787" );
  43. SpawnObject( "Land_Lamp_City1_amp", "7658.429688 179.540482 11478.932617", "0.178926 -4.293135 -2.388787" );
  44. SpawnObject( "Land_FuelStation_Build", "7431.662598 175.680069 11591.518555", "-41.994717 -0.366550 -0.825126" );
  45. SpawnObject( "Land_Lunapark_Shooting_Gallery", "7659.112793 176.443451 11500.113281", "-45.768452 4.013696 3.304730" );
  46. SpawnObject( "Land_Train_Wagon_Box", "7640.267578 176.091690 11586.050781", "67.999992 0.000000 -0.183387" );
  47. SpawnObject( "Land_Rail_Warehouse_Small", "7595.722656 176.488663 11492.625000", "81.999588 0.091621 0.724993" );
  48. SpawnObject( "Land_Misc_DeerStand2", "7599.828613 177.502762 11467.818359", "0.016425 1.282995 0.733547" );
  49. SpawnObject( "Land_Misc_DeerStand2", "7684.366699 177.374054 11542.743164", "0.096462 4.298265 1.286825" );
  50. SpawnObject( "Land_Wreck_Tractor", "7646.313965 176.053375 11501.151367", "0.022424 0.824359 1.558205" );
  51. SpawnObject( "Land_House_2B03", "7626.735840 182.125916 11544.178711", "75.022583 0.824359 1.558205" );
  52. SpawnObject( "Land_Misc_Scaffolding", "7641.218262 178.570251 11548.997070", "165.131561 -0.708664 2.294396" );
  53. SpawnObject( "Land_Misc_FeedShack", "7669.734375 177.032532 11514.094727", "0.000586 -0.091619 -0.366767" );
  54. SpawnObject( "GardenPlot", "7635.212402 175.113907 11466.333008", "-19.920975 -1.645944 -2.749111" );
  55. SpawnObject( "Land_Wall_Gate_Fen2_R", "7662.853027 176.630539 11478.470703", "11.079023 -1.645944 -2.749111" );
  56. SpawnObject( "Spotlight", "7660.905273 175.504517 11479.725586", "-23.000013 0.000000 0.000000" );
  57. SpawnObject( "Refridgerator", "7618.235840 174.512512 11487.292969", "-36.558224 0.000000 -0.000000" );
  58. SpawnObject( "HescoBox", "7661.662109 175.313156 11480.917969", "11.000002 0.000000 0.000000" );
  59. SpawnObject( "Barrel_Green", "7661.956055 175.569473 11482.671875", "0.000000 0.000000 0.000000" );
  60. SpawnObject( "Animal_GallusGallusDomesticus", "7716.729004 174.410172 11549.103516", "100.021591 0.000000 -0.000000" );
  61. SpawnObject( "Animal_CapraHircusF", "7788.848145 173.859528 11844.253906", "-81.402992 -0.000000 -0.000000" );
  62. SpawnObject( "Land_Wall_Gate_Fen2_L", "7631.190430 175.534241 11489.109375", "24.980215 0.824494 -1.374921" );
  63. SpawnObject( "Land_Wall_Gate_Fen2_L", "7628.414063 175.581573 11490.224609", "20.030788 -1.282466 -1.375123" );
  64. SpawnObject( "Land_Wall_Gate_Fen2_L", "7631.998535 175.369919 11487.072266", "-64.948647 -1.189405 -2.474213" );
  65. SpawnObject( "Land_Wall_Gate_Fen2_L", "7629.812988 175.357651 11486.076172", "21.051416 -1.189405 -2.474213" );
  66. SpawnObject( "Land_Wall_Gate_Fen2_R", "7658.070801 176.367264 11479.642578", "0.079021 -1.645804 -2.749251" );
  67. SpawnObject( "Land_Wall_Gate_Fen2_R", "7658.070801 176.367264 11479.642578", "0.079021 -1.645804 -2.749251" );
  68. SpawnObject( "Land_streambed_leaf_long_snake", "7642.268066 174.192917 11491.533203", "0.036215 1.740524 1.192175" );
  69. SpawnObject( "Land_Shed_W3", "7624.177246 175.350250 11490.625977", "29.036230 1.740524 1.192175" );
  70. SpawnObject( "Land_Wall_Gate_Wood1", "7625.201172 174.621719 11488.673828", "28.036228 1.739939 2.118208" );
  71. SpawnObject( "Land_Ruin_House_1W09", "7623.673828 174.712006 11490.299805", "0.006450 3.026990 0.091850" );
  72. SpawnObject( "Land_Wall_Gate_Fen2_L", "7627.024414 175.378311 11487.493164", "33.997063 -0.366603 0.458254" );
  73. SpawnObject( "Land_Wall_Gate_Tin6_2", "7628.803223 175.405838 11490.402344", "-157.071487 -0.062855 -0.828182" );
  74. SpawnObject( "Land_Roadblock_WoodenCrate", "7627.035156 174.735687 11489.725586", "29.928717 4.937146 -0.828182" );
  75. SpawnObject( "GardenPlot", "7592.299316 174.953064 11500.990234", "-7.063554 4.854911 -0.750872" );
  76. SpawnObject( "Land_Misc_Polytunnel", "7614.300781 176.276093 11462.119141", "-97.071320 0.937146 1.171818" );
  77. SpawnObject( "ClutterCutterFireplace", "7636.912109 174.515976 11489.417969", "0.000000 0.000000 0.000000" );
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement