Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void findLocations()
- {
- array<Object> objects = new array<Object>;
- array<CargoBase> proxy_cargos = new array<CargoBase>;
- FileHandle file = OpenFile("$profile:traintrackposevents.txt", FileMode.APPEND);
- GetGame().GetObjectsAtPosition("7500 0 7500", 16000, objects, proxy_cargos);
- for(int i = 0; i < objects.Count(); i++)
- {
- //repalce "YOURSELECTEDOBJECT" with your Static Object name
- YOURSELECTEDOBJECT theObject = YOURSELECTEDOBJECT.Cast(objects.Get(i));
- if(theObject)
- {
- vector pos = theObject.GetPosition();
- vector ori = theObject.GetOrientation();
- int a;
- if(ori[0] <= -90){
- a = -270 - ori[0];
- }else{
- a = 90 - ori[0];
- }
- FPrintln(file, "<pos x=\"" + pos[0] + "\" z=\"" + pos[2] + "\" a=\"" + a + "\" />");
- //FPrintln(file, "<group name=\"" + "YOURSELECTEDOBJECT\" " + "pos=\"" + pos[0] + " " + pos[1] + " " + pos[2] + "\"" + " rpy=\"" + ori[2] + " " + ori[1] + " " + ori[0] + "\"" + " " + "a=\"" + a + "\"" + "/>" );
- }
- }
- CloseFile(file);
- }
- #define DISABLE_PERSISTENCY
- #include "$CurrentDir:Missions\\DayZCommunityOfflineMode.ChernarusPlus\\core\\BaseModuleInclude.c"
- Mission CreateCustomMission(string path)
- {
- if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
- return new CommunityOfflineServer();
- return new CommunityOfflineClient();
- }
- void main()
- {
- findLocations();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement