Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * init.c
- *
- * DayZ Expansion Mod
- * www.dayzexpansion.com
- * © 2020 DayZ Expansion Mod Team
- *
- * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
- * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
- *
- */
- #include "$CurrentDir:\\mpmissions\\Expansion.ChernarusPlus\\expansion\\ExpansionObjectSpawnTools.c"
- #include "$CurrentDir:\\mpmissions\\Expansion.ChernarusPlus\\expansion\\missions\\MissionConstructor.c"
- void main()
- {
- bool loadTraderObjects = true;
- bool loadTraderNPCs = false;
- string MissionWorldName = "empty";
- GetGame().GetWorldName(MissionWorldName);
- if (MissionWorldName != "empty")
- {
- //! Spawn mission objects and traders
- FindMissionFiles(MissionWorldName, loadTraderObjects, loadTraderNPCs);
- }
- //INIT WEATHER BEFORE ECONOMY INIT------------------------
- Weather weather = g_Game.GetWeather();
- weather.MissionWeather(false); // false = use weather controller from Weather.c
- weather.GetOvercast().Set( Math.RandomFloatInclusive(0.02, 0.1), 1, 0);
- weather.GetRain().Set( 0, 1, 0);
- weather.GetFog().Set( 0, 1, 0);
- //INIT ECONOMY--------------------------------------
- Hive ce = CreateHive();
- if ( ce )
- ce.InitOffline();
- //DATE RESET AFTER ECONOMY INIT-------------------------
- int year, month, day, hour, minute;
- int reset_month = 8, reset_day = 10;
- 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);
- }
- }
- }
- }
- /**@class CustomExpansionMission
- * @brief This class handle expansion serverside mission
- **/
- class CustomMission: MissionServer
- {
- // ------------------------------------------------------------
- // SetRandomHealth
- // ------------------------------------------------------------
- void SetRandomHealth(EntityAI itemEnt)
- {
- if ( itemEnt )
- {
- int rndHlt = Math.RandomInt(55,100);
- itemEnt.SetHealth("","",rndHlt);
- }
- }
- override void OnInit()
- {
- ExpansionMissionModule missionModule;
- if ( Class.CastTo( missionModule, GetModuleManager().GetModule( ExpansionMissionModule ) ) )
- {
- missionModule.SetMissionConstructor( COMMissionConstructor );
- }
- super.OnInit();
- }
- // ------------------------------------------------------------
- // Override PlayerBase CreateCharacter
- // ------------------------------------------------------------
- override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
- {
- Entity playerEnt;
- playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
- Class.CastTo(m_player, playerEnt);
- GetGame().SelectPlayer(identity, m_player);
- return m_player;
- }
- // ------------------------------------------------------------
- // Override StartingEquipSetup
- // ------------------------------------------------------------
- /////////////////////////CUSTOMS LOADOUTS APOCALYPSE////////////////////////////////
- ref TStringArray admins = {"76561198205607135","ADMIN_Xn_STEAMID64"};//<---IDS Admis
- ref TStringArray BronzeVIP = {"ADMIN_p1_STEAMID64","ADMIN_p6_STEAMID64"};//<---IDS VIP Bronze
- ref TStringArray SilverVIP = {"ADMIN_p1_STEAMID64","ADMIN_p1_STEAMID64"};//<---IDS VIP Silver
- ref TStringArray ApoVIP = {"ADMIN_ph_STEAMID64","ADMIN_gf_STEAMID64"};//<---IDS VIP Apocalypse
- ////////////////////////////////////////////////////////////////////////////////////
- override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
- {
- player.RemoveAllItems();
- EntityAI itemEnt;
- ItemBase itemBs;
- float rand;
- /////CUSTOM LOADOUTS ADMIS//////////
- for ( int i = 0; i < admins.Count(); ++i )
- if (player.GetIdentity().GetPlainId() == admins[i])
- {
- player.RemoveAllItems();
- EntityAI PrimTop = player.GetInventory().CreateInInventory("M65Jacket_Olive");
- PrimTop.GetInventory().CreateInInventory("TacticalBaconCan")
- PrimTop.GetInventory().CreateInInventory("Battery9V")
- PrimTop.GetInventory().CreateInInventory("Battery9V")
- PrimTop.GetInventory().CreateInInventory("Battery9V")
- EntityAI PrimComp = PrimTop.GetInventory().CreateInInventory("Compass")
- EntityAI PrimPant = player.GetInventory().CreateInInventory("USMCPants_Woodland");
- EntityAI PrimBoot = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
- EntityAI PrimKnif = PrimBoot.GetInventory().CreateAttachment("CombatKnife");
- EntityAI PrimBag = player.GetInventory().CreateInInventory("bag_6B38_camo_mung");
- EntityAI PrimRadio = PrimBag.GetInventory().CreateInInventory("PersonalRadio");
- EntityAI PrimCan = PrimBag.GetInventory().CreateAttachment("Canteen");
- EntityAI PrimAbox = PrimBag.GetInventory().CreateAttachment("AmmoBox");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
- EntityAI Pouches = PrimBag.GetInventory().CreateAttachment("MassPlateCarrierPouches_PartizanM");
- Pouches.GetInventory().CreateInInventory("Mag\_STANAG\_30Rnd");
- Pouches.GetInventory().CreateInInventory("Mag\_STANAG\_30Rnd");
- Pouches.GetInventory().CreateInInventory("Mag\_STANAG\_30Rnd");
- EntityAI FirstA = Pouches.GetInventory().CreateInInventory("FirstAidKit");
- FirstA.GetInventory().CreateInInventory("BandageDressing");
- FirstA.GetInventory().CreateInInventory("BandageDressing");
- FirstA.GetInventory().CreateInInventory("BloodBagEmpty");
- FirstA.GetInventory().CreateInInventory("SurgicalGloves_Blue");
- FirstA.GetInventory().CreateInInventory("BloodTestKit");
- EntityAI PrimGun = player.GetHumanInventory().CreateInHands("M4A1");
- PrimGun.GetInventory().CreateAttachment("M4_RISHndgrd");
- PrimGun.GetInventory().CreateAttachment("M4_CQBBttstck");
- PrimGun.GetInventory().CreateAttachment("M4_Suppressor");
- EntityAI PrimSight = PrimGun.GetInventory().CreateAttachment("ACOGOptic");
- PrimSight.GetInventory().CreateInInventory("Battery9V");
- EntityAI PrimLight = PrimGun.GetInventory().CreateAttachment("UniversalLight");
- PrimLight.GetInventory().CreateInInventory("Battery9V");
- player.SetQuickBarEntityShortcut(PrimGun, 1, true);
- player.SetQuickBarEntityShortcut(PrimKnif, 3, true);
- player.SetQuickBarEntityShortcut(PrimCan, 4, true);
- player.SetQuickBarEntityShortcut(PrimComp, 5, true);
- player.SetQuickBarEntityShortcut(PrimRadio, 6, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- }
- /////CUSTOM LOADOUTS VIP BRONZE//////////
- for ( int p1 = 0; p1 < BronzeVIP.Count(); ++p1 )
- if (player.GetIdentity().GetPlainId() == BronzeVIP[p1])
- {
- player.RemoveAllItems();
- switch (Math.RandomInt(0, 3)) {
- case 0:
- EntityAI PrimHead1 = player.GetHumanInventory().CreateInInventory("DirtBikeHelmet_Khaki");
- EntityAI PrimMask1 = player.GetHumanInventory().CreateInInventory("SurgicalMask");
- EntityAI PrimHand1 = player.GetHumanInventory().CreateInInventory("WorkingGloves_Brown");
- EntityAI PrimTop1 = player.GetInventory().CreateInInventory("Raincoat_Green");
- PrimTop1.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrimKnife1 = PrimTop1.GetInventory().CreateInInventory("HuntingKnife");
- PrimTop1.GetInventory().CreateInInventory("Rag");
- EntityAI PrinFot1 = PrimTop1.GetInventory().CreateInInventory("BakedBeansCan");
- EntityAI PrimComp1 = PrimTop1.GetInventory().CreateInInventory("Compass");
- PrimTop1.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimPant1 = player.GetInventory().CreateInInventory("CargoPants_Black");
- EntityAI PrimBoot1 = player.GetInventory().CreateInInventory("HikingBoots_Black");
- EntityAI PrimBag1 = player.GetInventory().CreateInInventory("CourierBag");
- PrimBag1.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
- EntityAI PrimCan1 = PrimBag1.GetInventory().CreateAttachment("Canteen");
- EntityAI PrimGun1 = player.GetHumanInventory().CreateInHands("MakarovIJ70");
- player.SetQuickBarEntityShortcut(PrimGun1, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan1, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot1, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife1, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp1, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- case 1:
- EntityAI PrimHead11 = player.GetHumanInventory().CreateInInventory("DirtBikeHelmet_Black");
- EntityAI PrimMask11 = player.GetHumanInventory().CreateInInventory("SurgicalMask");
- EntityAI PrimHand11 = player.GetHumanInventory().CreateInInventory("WorkingGloves_Brown");
- EntityAI PrimTop11 = player.GetInventory().CreateInInventory("Raincoat_Black");
- PrimTop11.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrimKnife11 = PrimTop11.GetInventory().CreateInInventory("HuntingKnife");
- PrimTop11.GetInventory().CreateInInventory("Rag");
- EntityAI PrinFot11 = PrimTop11.GetInventory().CreateInInventory("BakedBeansCan");
- EntityAI PrimComp11 = PrimTop11.GetInventory().CreateInInventory("Compass");
- PrimTop11.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimPant11 = player.GetInventory().CreateInInventory("CargoPants_Black");
- EntityAI PrimBoot11 = player.GetInventory().CreateInInventory("HikingBoots_Brown");
- EntityAI PrimBag11 = player.GetInventory().CreateInInventory("CourierBag");
- PrimBag11.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
- EntityAI PrimCan11 = PrimBag11.GetInventory().CreateAttachment("Canteen");
- EntityAI PrimGun11 = player.GetHumanInventory().CreateInHands("MakarovIJ70");
- player.SetQuickBarEntityShortcut(PrimGun11, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan11, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot11, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife11, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp11, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- case 2:
- EntityAI PrimHead12 = player.GetHumanInventory().CreateInInventory("DirtBikeHelmet_Red");
- EntityAI PrimMask12 = player.GetHumanInventory().CreateInInventory("SurgicalMask");
- EntityAI PrimHand12 = player.GetHumanInventory().CreateInInventory("WorkingGloves_Yellow");
- EntityAI PrimTop12 = player.GetInventory().CreateInInventory("Raincoat_Orange");
- PrimTop12.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrimKnife12 = PrimTop12.GetInventory().CreateInInventory("HuntingKnife");
- PrimTop12.GetInventory().CreateInInventory("Rag");
- EntityAI PrinFot12 = PrimTop12.GetInventory().CreateInInventory("BakedBeansCan");
- EntityAI PrimComp12 = PrimTop12.GetInventory().CreateInInventory("Compass");
- PrimTop12.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimPant12 = player.GetInventory().CreateInInventory("CargoPants_Black");
- EntityAI PrimBoot12 = player.GetInventory().CreateInInventory("HikingBootsLow_Blue");
- EntityAI PrimBag12 = player.GetInventory().CreateInInventory("CourierBag");
- PrimBag12.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
- EntityAI PrimCan12 = PrimBag12.GetInventory().CreateAttachment("Canteen");
- EntityAI PrimGun12 = player.GetHumanInventory().CreateInHands("MakarovIJ70");
- player.SetQuickBarEntityShortcut(PrimGun1, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan1, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot1, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife1, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp1, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- }
- }
- /////CUSTOM LOADOUTS VIP SILVER//////////
- for ( int p2 = 0; p2 < SilverVIP.Count(); ++p2 )
- if (player.GetIdentity().GetPlainId() == SilverVIP[p2])
- {
- player.RemoveAllItems();
- switch (Math.RandomInt(0, 3)) {
- case 0:
- EntityAI PrimHead2 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_Black");
- EntityAI PrimMask2 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");
- EntityAI PrimHand2 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Green");
- EntityAI PrimVest2 = player.GetHumanInventory().CreateInInventory("PoliceVest");
- EntityAI PrimTop2 = player.GetInventory().CreateInInventory("TacticalShirt_Black");
- PrimTop2.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrinFot2 = PrimTop2.GetInventory().CreateInInventory("TacticalBaconCan");
- PrimTop2.GetInventory().CreateInInventory("TunaCan");
- PrimTop2.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimBanda2 = PrimTop2.GetInventory().CreateInInventory("BandageDressing");
- EntityAI PrimComp2 = PrimTop2.GetInventory().CreateInInventory("Compass");
- EntityAI PrimPant2 = player.GetInventory().CreateInInventory("CargoPants_Black");
- EntityAI PrimBoot2 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
- EntityAI PrimKnife2 = PrimBoot2.GetInventory().CreateAttachment("CombatKnife");
- EntityAI PrimAxe2 = player.GetInventory().CreateInInventory("WoodAxe");
- EntityAI PrimBag2 = player.GetInventory().CreateInInventory("DryBag_Black");
- EntityAI PrimCan2 = PrimBag2.GetInventory().CreateInInventory("Canteen");
- EntityAI PrimGun2 = player.GetHumanInventory().CreateInHands("Repeater");
- PrimTop2.GetInventory().CreateInInventory("Ammo_357");
- PrimTop2.GetInventory().CreateInInventory("Rag");
- player.SetQuickBarEntityShortcut(PrimGun2, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan2, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot2, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife2, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp2, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- case 1:
- EntityAI PrimHead21 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_Black");
- EntityAI PrimMask21 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");
- EntityAI PrimHand21 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Beige");
- EntityAI PrimVest21 = player.GetHumanInventory().CreateInInventory("PoliceVest");
- EntityAI PrimTop21 = player.GetInventory().CreateInInventory("TacticalShirt_Tan");
- PrimTop21.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrinFot21 = PrimTop21.GetInventory().CreateInInventory("TacticalBaconCan");
- PrimTop21.GetInventory().CreateInInventory("TunaCan");
- PrimTop21.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimBanda21 = PrimTop21.GetInventory().CreateInInventory("BandageDressing");
- EntityAI PrimComp21 = PrimTop21.GetInventory().CreateInInventory("Compass");
- EntityAI PrimPant21 = player.GetInventory().CreateInInventory("CargoPants_Black");
- EntityAI PrimBoot21 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
- EntityAI PrimKnife21 = PrimBoot21.GetInventory().CreateAttachment("CombatKnife");
- EntityAI PrimAxe21 = player.GetInventory().CreateInInventory("WoodAxe");
- EntityAI PrimBag21 = player.GetInventory().CreateInInventory("DryBag_Black");
- EntityAI PrimCan21 = PrimBag21.GetInventory().CreateInInventory("Canteen");
- EntityAI PrimGun21 = player.GetHumanInventory().CreateInHands("Repeater");
- PrimTop21.GetInventory().CreateInInventory("Ammo_357");
- PrimTop21.GetInventory().CreateInInventory("Rag");
- player.SetQuickBarEntityShortcut(PrimGun21, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan21, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot21, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife21, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp21, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- case 2:
- EntityAI PrimHead22 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_UN");
- EntityAI PrimMask22 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");
- EntityAI PrimHand22 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Black");
- EntityAI PrimVest22 = player.GetHumanInventory().CreateInInventory("PoliceVest");
- EntityAI PrimTop22 = player.GetInventory().CreateInInventory("PolicejacketOrel");
- PrimTop22.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrinFot22 = PrimTop22.GetInventory().CreateInInventory("TacticalBaconCan");
- PrimTop22.GetInventory().CreateInInventory("TunaCan");
- PrimTop22.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimBanda22 = PrimTop22.GetInventory().CreateInInventory("BandageDressing");
- EntityAI PrimComp22 = PrimTop22.GetInventory().CreateInInventory("Compass");
- EntityAI PrimPant22 = player.GetInventory().CreateInInventory("PolicePantsOrel");
- EntityAI PrimBoot22 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
- EntityAI PrimKnife22 = PrimBoot22.GetInventory().CreateAttachment("CombatKnife");
- EntityAI PrimAxe22 = player.GetInventory().CreateInInventory("WoodAxe");
- EntityAI PrimBag22 = player.GetInventory().CreateInInventory("DryBag_Black");
- EntityAI PrimCan22 = PrimBag22.GetInventory().CreateInInventory("Canteen");
- EntityAI PrimGun22 = player.GetHumanInventory().CreateInHands("Repeater");
- PrimTop2.GetInventory().CreateInInventory("Ammo_357");
- PrimTop2.GetInventory().CreateInInventory("Rag");
- player.SetQuickBarEntityShortcut(PrimGun22, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan22, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot22, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife22, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp22, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- case 3:
- EntityAI PrimHead23 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_Black");
- EntityAI PrimMask23 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");
- EntityAI PrimHand23 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Green");
- EntityAI PrimVest23 = player.GetHumanInventory().CreateInInventory("PoliceVest");
- EntityAI PrimTop23 = player.GetInventory().CreateInInventory("TacticalShirt_Black");
- PrimTop23.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrinFot23 = PrimTop23.GetInventory().CreateInInventory("TacticalBaconCan");
- PrimTop23.GetInventory().CreateInInventory("TunaCan");
- PrimTop23.GetInventory().CreateInInventory("TunaCan");
- EntityAI PrimBanda23 = PrimTop23.GetInventory().CreateInInventory("BandageDressing");
- EntityAI PrimComp23 = PrimTop23.GetInventory().CreateInInventory("Compass");
- EntityAI PrimPant23 = player.GetInventory().CreateInInventory("CargoPants_Black");
- EntityAI PrimBoot23 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
- EntityAI PrimKnife23 = PrimBoot23.GetInventory().CreateAttachment("CombatKnife");
- EntityAI PrimAxe23 = player.GetInventory().CreateInInventory("WoodAxe");
- EntityAI PrimBag23 = player.GetInventory().CreateInInventory("DryBag_Black");
- EntityAI PrimCan23 = PrimBag23.GetInventory().CreateInInventory("Canteen");
- EntityAI PrimGun23 = player.GetHumanInventory().CreateInHands("Repeater");
- PrimTop23.GetInventory().CreateInInventory("Ammo_357");
- PrimTop23.GetInventory().CreateInInventory("Rag");
- player.SetQuickBarEntityShortcut(PrimGun23, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan23, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot23, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife23, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp23, 4, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- break;
- }
- }
- ///// CUSTOM LOADOUTS VIP APOCALYSE //////////
- for ( int p3 = 0; p3 < ApoVIP.Count(); ++p3 )
- if (player.GetIdentity().GetPlainId() == ApoVIP[p3])
- {
- player.RemoveAllItems();
- EntityAI PrimHead3 = player.GetHumanInventory().CreateInInventory("Mich2001Helmet")
- EntityAI PrimMask3 = player.GetHumanInventory().CreateInInventory("GasMask")
- EntityAI PrimHand3 = player.GetHumanInventory().CreateInInventory("OMNOGloves_Gray")
- EntityAI PrimBelt3 = player.GetHumanInventory().CreateAttachment("MilitaryBelt");
- EntityAI PrimCan3 = PrimBelt3.GetInventory().CreateAttachment("Canteen");
- EntityAI PrimVest3 = player.GetHumanInventory().CreateInInventory("HighCapacityVest_Olive")
- EntityAI PrimSali3 = PrimVest3.GetInventory().CreateInInventory("SalineBagIV");
- PrimVest3.GetInventory().CreateInInventory("Heatpack");
- PrimVest3.GetInventory().CreateInInventory("Matchbox");
- EntityAI PrimBanda3 = PrimVest3.GetInventory().CreateInInventory("BandageDressing");
- PrimVest3.GetInventory().CreateInInventory("BandageDressing");
- EntityAI PrimTop3 = player.GetInventory().CreateInInventory("HuntingJacket_Summer");
- PrimTop3.GetInventory().CreateInInventory("ChernarusMap");
- EntityAI PrinFot3 = PrimTop3.GetInventory().CreateInInventory("TacticalBaconCan");
- PrimTop3.GetInventory().CreateInInventory("TacticalBaconCan");
- PrimTop3.GetInventory().CreateInInventory("TunaCan");
- PrimTop3.GetInventory().CreateInInventory("SardinesCan");
- EntityAI PrimComp3 = PrimTop3.GetInventory().CreateInInventory("Compass");
- EntityAI PrimPant3 = player.GetInventory().CreateInInventory("HunterPants_Summer");
- EntityAI PrimBoot3 = player.GetInventory().CreateInInventory("MilitaryBoots_Brown");
- EntityAI PrimKnife3 = PrimBoot3.GetInventory().CreateAttachment("CombatKnife");
- EntityAI PrimShov3 = player.GetInventory().CreateInInventory("Shovel");
- EntityAI PrimHatc3 = player.GetInventory().CreateInInventory("Hatchet");
- EntityAI PrimBag3 = player.GetInventory().CreateInInventory("HuntingBag");
- EntityAI PrimGun3 = player.GetHumanInventory().CreateInHands("SKS");
- itemEnt = PrimVest3.GetInventory().CreateInInventory("Ammo_762x39");
- if ( Class.CastTo(itemBs, itemEnt ) )
- itemBs.SetQuantity(15);
- itemEnt = PrimVest3.GetInventory().CreateInInventory("Ammo_762x39");
- if ( Class.CastTo(itemBs, itemEnt ) )
- itemBs.SetQuantity(15);
- player.SetQuickBarEntityShortcut(PrimGun3, 0, true);
- player.SetQuickBarEntityShortcut(PrimCan3, 1, true);
- player.SetQuickBarEntityShortcut(PrinFot3, 2, true);
- player.SetQuickBarEntityShortcut(PrimKnife3, 3, true);
- player.SetQuickBarEntityShortcut(PrimComp3, 4, true);
- player.SetQuickBarEntityShortcut(PrimBanda3, 5, true);
- player.SetQuickBarEntityShortcut(PrimHatc3, 6, true);
- player.SetQuickBarEntityShortcut(PrimShov3, 7, true);
- player.SetQuickBarEntityShortcut(PrimSali3, 8, true);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.25 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
- else if ( rand > 0.75 )
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
- else
- itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- }
- switch (Math.RandomInt(10, 19)) {
- case 10:
- // Soldier
- player.GetInventory().CreateInInventory("TTSKOPants");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("TShirt_Green");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("MilitaryBoots_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("TacticalBaconCan");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn = player.GetHumanInventory().CreateInHands("CombatKnife");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn, 0, true);
- break;
- case 11:
- // Paramedic
- player.GetInventory().CreateInInventory("SurgicalMask");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("SurgicalGloves_Green");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("ParamedicPants_Green");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("ParamedicJacket_Green");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("SalineBagIV");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("BandageDressing");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("AthleticShoes_Green");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn1 = player.GetHumanInventory().CreateInHands("SteakKnife");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn1, 0, true);
- break;
- case 12:
- // Office worker
- player.GetInventory().CreateInInventory("SlacksPants_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("ManSuit_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("DressShoes_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("TunaCan");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("ThinFramesGlasses");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn2 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn2, 0, true);
- break;
- case 13:
- // Biker
- player.GetInventory().CreateInInventory("Jeans_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("RidersJacket_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("MotoHelmet_Red");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("HikingBootsLow_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Matchbox");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn3 = player.GetHumanInventory().CreateInHands("NailedBaseballBat");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn3, 0, true);
- break;
- case 14:
- // Hiker
- player.GetInventory().CreateInInventory("Ushanka_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("HikingJacket_Red");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("AthleticShoes_Blue");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("CargoPants_Blue");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("CivilianBelt");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Heatpack");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn4 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn4, 0, true);
- break;
- case 15:
- // Cop
- player.GetInventory().CreateInInventory("PoliceCap");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("PoliceJacket");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("PolicePants");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("CombatBoots_Grey");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Handcuffs");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("HandcuffKeys");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("PersonalRadio");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn5 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn5, 0, true);
- break;
- case 16:
- // Lumberjack
- player.GetInventory().CreateInInventory("Shirt_RedCheck");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Jeans_Blue");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("WorkingBoots_Brown");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Ushanka_Green");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn6 = player.GetHumanInventory().CreateInHands("Hatchet");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn6, 0, true);
- break;
- case 17:
- // Hood
- player.GetInventory().CreateInInventory("Crowbar");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("WorkingGloves_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Balaclava3Holes_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("TrackSuitPants_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("TShirt_White");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("AthleticShoes_Black");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI kn7 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(kn7, 0, true);
- break;
- case 18:
- // Fireman
- player.GetInventory().CreateInInventory("FirefighterJacket_Beige");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("FirefightersPants_Beige");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("FirefightersHelmet_White");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("WorkingBoots_Yellow");itemBs = ItemBase.Cast(itemEnt);
- player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
- EntityAI fa8 = player.GetHumanInventory().CreateInHands("FirefighterAxe");itemBs = ItemBase.Cast(itemEnt);
- player.SetQuickBarEntityShortcut(fa8, 0, true);
- break;
- }
- // Give universal gear
- player.GetInventory().CreateInInventory("WaterBottle");
- player.GetInventory().CreateInInventory("TunaCan");
- player.GetInventory().CreateInInventory("ChernarusMap");
- string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
- int rndIndex = Math.RandomInt(0, 4);
- itemEnt = player.GetInventory().CreateInInventory(chemlightArray[rndIndex]);
- SetRandomHealth(itemEnt);
- rand = Math.RandomFloatInclusive(0.0, 1.0);
- if ( rand < 0.35 )
- itemEnt = player.GetInventory().CreateInInventory("Apple");
- else if ( rand > 0.65 )
- itemEnt = player.GetInventory().CreateInInventory("Pear");
- else
- itemEnt = player.GetInventory().CreateInInventory("Plum");
- SetRandomHealth(itemEnt);
- }
- };
- Mission CreateCustomMission(string path)
- {
- return new CustomMission();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement