Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main()
- {
- Hive ce = CreateHive();
- if ( ce )
- ce.InitOffline();
- Weather weather = g_Game.GetWeather();
- weather.GetOvercast().SetLimits( 0.0 , 1.0 );
- weather.GetRain().SetLimits( 0.0 , 1.0 );
- weather.GetFog().SetLimits( 0.0 , 0.25 );
- weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );
- weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );
- weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );
- weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
- weather.GetRain().SetForecastTimeLimits( 600 , 600 );
- weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );
- weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
- weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
- weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
- weather.SetWindMaximumSpeed(15);
- weather.SetWindFunctionParams(0.1, 0.3, 50);
- }
- class CustomMission: MissionServer
- {
- override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
- {
- Entity playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");
- Class.CastTo(m_player, playerEnt);
- GetGame().SelectPlayer(identity, m_player);
- return m_player;
- }
- void addMags(PlayerBase player, string mag_type, int count) {
- for (int i = 0; i < count; i++) {
- player.GetInventory().CreateInInventory(mag_type);
- }
- }
- EntityAI assaultClass(PlayerBase player) {
- EntityAI gun = player.GetInventory().CreateInInventory("M4A1");
- gun.GetInventory().CreateAttachment("M4_RISHndgrd_Black");
- gun.GetInventory().CreateAttachment("M4_MPBttstck_Black");
- gun.GetInventory().CreateAttachment("ACOGOptic");
- gun.GetInventory().CreateAttachment("M4_Suppressor");
- addMags(player, "Mag_STANAG_30Rnd", 3);
- player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- player.GetInventory().CreateInInventory("M68Optic");
- player.GetInventory().CreateInInventory("Battery9V");
- return gun;
- }
- EntityAI sniperClass(PlayerBase player) {
- EntityAI gun = player.GetInventory().CreateInInventory("SVD");
- gun.GetInventory().CreateAttachment("PSO1Optic");
- addMags(player, "Mag_SVD_10Rnd", 3);
- player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
- return gun;
- }
- EntityAI smgClass(PlayerBase player) {
- EntityAI gun = player.GetInventory().CreateInInventory("AKM");
- gun.GetInventory().CreateAttachment("AK_Suppressor");
- gun.GetInventory().CreateAttachment("PSO1Optic");
- gun.GetInventory().CreateAttachment("AK_WoodBttstck");
- gun.GetInventory().CreateAttachment("AK_WoodHndgrd");
- addMags(player, "Mag_AKM_30Rnd", 3);
- player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
- player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
- player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
- player.GetInventory().CreateInInventory("KobraOptic");
- return gun;
- }
- override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
- {
- player.RemoveAllItems();
- player.GetInventory().CreateInInventory("CargoPants_Black");
- player.GetInventory().CreateInInventory("TacticalShirt_Black");
- player.GetInventory().CreateInInventory("CombatBoots_Beige");
- player.GetInventory().CreateInInventory("AssaultBag_Black");
- player.GetInventory().CreateInInventory("BoonieHat_Black");
- player.GetInventory().CreateInInventory("UKAssVest_Black");
- player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- player.GetInventory().CreateInInventory("SpaghettiCan");
- player.GetInventory().CreateInInventory("CanOpener");
- player.GetInventory().CreateInInventory("SalineBagIV");
- player.GetInventory().CreateInInventory("SalineBagIV");
- EntityAI rags = player.GetInventory().CreateInInventory("Rag");
- ItemBase.Cast(rags).SetQuantity(4);
- switch (Math.RandomInt(0, 3)) {
- case 0: primary = assaultClass(player); break;
- case 1: primary = sniperClass(player); break;
- case 2: primary = smgClass(player); break;
- }
- player.LocalTakeEntityToHands(primary);
- player.SetQuickBarEntityShortcut(primary, 0, true);
- player.SetQuickBarEntityShortcut(rags, 2, true);
- player.SetQuickBarEntityShortcut(axe, 3, true);
- }
- };
- Mission CreateCustomMission(string path)
- {
- return new CustomMission();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement