ItchyKOS

Community Offline Mode INIT file

Aug 24th, 2019
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. //Spawn helper function
  2. void SpawnObject(string objectName, vector position, vector orientation)
  3. {
  4. Object obj;
  5. obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));
  6. obj.SetPosition( position );
  7. obj.SetOrientation( orientation );
  8.  
  9. // Force update collisions
  10. if ( obj.CanAffectPathgraph() )
  11. {
  12. obj.SetAffectPathgraph(true, false);
  13. GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
  14. }
  15. }
  16.  
  17. #define DISABLE_PERSISTENCY
  18.  
  19. #include "$CurrentDir:Missions\\DayZCommunityOfflineMode.ChernarusPlus\\core\\BaseModuleInclude.c"
  20.  
  21. Mission CreateCustomMission(string path)
  22. {
  23. if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
  24. return new CommunityOfflineServer();
  25.  
  26. return new CommunityOfflineClient();
  27. }
  28.  
  29. void main()
  30. {
  31. }
Add Comment
Please, Sign In to add comment