Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
- }
- #include "$CurrentDir:\\mpmissions\\yRun.chernarusplus\\Buildings\\NorthSZ.c"
- #include "$CurrentDir:\\mpmissions\\yRun.chernarusplus\\Buildings\\SouthSZ.c"
- #include "$CurrentDir:\\mpmissions\\yRun.chernarusplus\\Buildings\\NWAF.c"
- #include "$CurrentDir:\\mpmissions\\yRun.chernarusplus\\Buildings\\SWAF.c"
- #include "$CurrentDir:\\mpmissions\\yRun.chernarusplus\\Buildings\\NEAF.c"
- void main()
- {
- //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);
- }
- }
- }
- //INIT WEATHER AFTER ECONOMY INIT------------------------
- Weather weather = g_Game.GetWeather();
- weather.MissionWeather(true); // false = use weather controller from Weather.c
- weather.GetRain().SetLimits( 0.0 , 0.0 );
- weather.GetOvercast().SetLimits( 0.0 , 0.0 );
- weather.GetFog().SetLimits( 0.0 , 0.01 );
- weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.0 );
- weather.GetRain().SetForecastChangeLimits( 0.0, 0.0 );
- weather.GetFog().SetForecastChangeLimits( 0.0, 0.1 );
- weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
- weather.GetRain().SetForecastTimeLimits( 600 , 600 );
- weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );
- weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
- weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
- weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
- weather.SetWindMaximumSpeed(5);
- weather.SetWindFunctionParams(0.1, 0.3, 50);
- SAFEZONE_NORTH();
- SAFEZONE_SOUTH();
- NWAF();
- SWAF();
- NEAF();
- //GetCEApi().ExportProxyData( "7500 0 7500", 10000 ); //Center of map, radius of how far to go out and find buildings.
- }
- class CustomMission: MissionServer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement