Advertisement
iKurdo

init.c

Jul 11th, 2020 (edited)
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 37.84 KB | Gaming | 0 0
  1. /**
  2.  * init.c
  3.  *
  4.  * DayZ Expansion Mod
  5.  * www.dayzexpansion.com
  6.  * © 2020 DayZ Expansion Mod Team
  7.  *
  8.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10.  *
  11. */
  12.  
  13. #include "$CurrentDir:\\mpmissions\\Expansion.ChernarusPlus\\expansion\\ExpansionObjectSpawnTools.c"
  14. #include "$CurrentDir:\\mpmissions\\Expansion.ChernarusPlus\\expansion\\missions\\MissionConstructor.c"
  15.  
  16. void main()
  17. {
  18.     bool loadTraderObjects = true;
  19.     bool loadTraderNPCs = false;
  20.  
  21.     string MissionWorldName = "empty";
  22.     GetGame().GetWorldName(MissionWorldName);
  23.  
  24.     if (MissionWorldName != "empty")
  25.     {
  26.         //! Spawn mission objects and traders
  27.         FindMissionFiles(MissionWorldName, loadTraderObjects, loadTraderNPCs);
  28.     }
  29.  
  30.     //INIT WEATHER BEFORE ECONOMY INIT------------------------
  31.     Weather weather = g_Game.GetWeather();
  32.  
  33.     weather.MissionWeather(false);  // false = use weather controller from Weather.c
  34.  
  35.     weather.GetOvercast().Set( Math.RandomFloatInclusive(0.02, 0.1), 1, 0);
  36.     weather.GetRain().Set( 0, 1, 0);
  37.     weather.GetFog().Set( 0, 1, 0);
  38.  
  39.     //INIT ECONOMY--------------------------------------
  40.     Hive ce = CreateHive();
  41.     if ( ce )
  42.         ce.InitOffline();
  43.  
  44.     //DATE RESET AFTER ECONOMY INIT-------------------------
  45.     int year, month, day, hour, minute;
  46.     int reset_month = 8, reset_day = 10;
  47.     GetGame().GetWorld().GetDate(year, month, day, hour, minute);
  48.  
  49.     if ((month == reset_month) && (day < reset_day))
  50.     {
  51.         GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
  52.     }
  53.     else
  54.     {
  55.         if ((month == reset_month + 1) && (day > reset_day))
  56.         {
  57.             GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
  58.         }
  59.         else
  60.         {
  61.             if ((month < reset_month) || (month > reset_month + 1))
  62.             {
  63.                 GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
  64.             }
  65.         }
  66.     }
  67. }
  68.  
  69. /**@class       CustomExpansionMission
  70.  * @brief       This class handle expansion serverside mission
  71.  **/
  72. class CustomMission: MissionServer
  73. {
  74.     // ------------------------------------------------------------
  75.     // SetRandomHealth
  76.     // ------------------------------------------------------------
  77.     void SetRandomHealth(EntityAI itemEnt)
  78.     {
  79.         if ( itemEnt )
  80.         {
  81.             int rndHlt = Math.RandomInt(55,100);
  82.             itemEnt.SetHealth("","",rndHlt);
  83.         }
  84.     }
  85.    
  86.     override void OnInit()
  87.     {
  88.         ExpansionMissionModule missionModule;
  89.         if ( Class.CastTo( missionModule, GetModuleManager().GetModule( ExpansionMissionModule ) ) )
  90.         {
  91.             missionModule.SetMissionConstructor( COMMissionConstructor );
  92.         }
  93.  
  94.         super.OnInit();
  95.     }
  96.    
  97.     // ------------------------------------------------------------
  98.     // Override PlayerBase CreateCharacter
  99.     // ------------------------------------------------------------
  100.     override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
  101.     {
  102.         Entity playerEnt;
  103.         playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
  104.         Class.CastTo(m_player, playerEnt);
  105.  
  106.         GetGame().SelectPlayer(identity, m_player);
  107.  
  108.         return m_player;
  109.     }
  110.  
  111.     // ------------------------------------------------------------
  112.     // Override StartingEquipSetup
  113.     // ------------------------------------------------------------
  114.     /////////////////////////CUSTOMS LOADOUTS APOCALYPSE////////////////////////////////   
  115.     ref TStringArray admins = {"76561198205607135","ADMIN_Xn_STEAMID64"};//<---IDS Admis
  116.     ref TStringArray BronzeVIP = {"ADMIN_p1_STEAMID64","ADMIN_p6_STEAMID64"};//<---IDS VIP Bronze
  117.     ref TStringArray SilverVIP = {"ADMIN_p1_STEAMID64","ADMIN_p1_STEAMID64"};//<---IDS VIP Silver
  118.     ref TStringArray ApoVIP = {"ADMIN_ph_STEAMID64","ADMIN_gf_STEAMID64"};//<---IDS VIP Apocalypse 
  119.     ////////////////////////////////////////////////////////////////////////////////////
  120.    
  121.     override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
  122.     {
  123.         player.RemoveAllItems();
  124.         EntityAI itemEnt;
  125.         ItemBase itemBs;
  126.         float rand;
  127.  
  128.        
  129.         /////CUSTOM LOADOUTS ADMIS//////////
  130.         for ( int i = 0; i < admins.Count(); ++i )     
  131.    
  132.         if (player.GetIdentity().GetPlainId() == admins[i])
  133.         {
  134.             player.RemoveAllItems();           
  135.  
  136.             EntityAI PrimTop = player.GetInventory().CreateInInventory("M65Jacket_Olive");
  137.             PrimTop.GetInventory().CreateInInventory("TacticalBaconCan")
  138.             PrimTop.GetInventory().CreateInInventory("Battery9V")
  139.             PrimTop.GetInventory().CreateInInventory("Battery9V")
  140.             PrimTop.GetInventory().CreateInInventory("Battery9V")
  141.             EntityAI PrimComp = PrimTop.GetInventory().CreateInInventory("Compass")
  142.             EntityAI PrimPant = player.GetInventory().CreateInInventory("USMCPants_Woodland");
  143.             EntityAI PrimBoot = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
  144.             EntityAI PrimKnif = PrimBoot.GetInventory().CreateAttachment("CombatKnife");
  145.            
  146.             EntityAI PrimBag = player.GetInventory().CreateInInventory("bag_6B38_camo_mung");
  147.             EntityAI PrimRadio = PrimBag.GetInventory().CreateInInventory("PersonalRadio");
  148.  
  149.             EntityAI PrimCan = PrimBag.GetInventory().CreateAttachment("Canteen");
  150.             EntityAI PrimAbox = PrimBag.GetInventory().CreateAttachment("AmmoBox");
  151.             PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  152.             PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  153.             PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  154.             PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  155.             PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  156.             PrimAbox.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  157.  
  158.             EntityAI Pouches = PrimBag.GetInventory().CreateAttachment("MassPlateCarrierPouches_PartizanM");
  159.             Pouches.GetInventory().CreateInInventory("Mag\_STANAG\_30Rnd");
  160.             Pouches.GetInventory().CreateInInventory("Mag\_STANAG\_30Rnd");
  161.             Pouches.GetInventory().CreateInInventory("Mag\_STANAG\_30Rnd");
  162.  
  163.             EntityAI FirstA = Pouches.GetInventory().CreateInInventory("FirstAidKit");
  164.             FirstA.GetInventory().CreateInInventory("BandageDressing");
  165.             FirstA.GetInventory().CreateInInventory("BandageDressing");
  166.             FirstA.GetInventory().CreateInInventory("BloodBagEmpty");
  167.             FirstA.GetInventory().CreateInInventory("SurgicalGloves_Blue");
  168.             FirstA.GetInventory().CreateInInventory("BloodTestKit");
  169.  
  170.             EntityAI PrimGun = player.GetHumanInventory().CreateInHands("M4A1");
  171.             PrimGun.GetInventory().CreateAttachment("M4_RISHndgrd");
  172.             PrimGun.GetInventory().CreateAttachment("M4_CQBBttstck");
  173.             PrimGun.GetInventory().CreateAttachment("M4_Suppressor");
  174.  
  175.             EntityAI PrimSight = PrimGun.GetInventory().CreateAttachment("ACOGOptic");
  176.             PrimSight.GetInventory().CreateInInventory("Battery9V");
  177.  
  178.             EntityAI PrimLight = PrimGun.GetInventory().CreateAttachment("UniversalLight");
  179.             PrimLight.GetInventory().CreateInInventory("Battery9V");
  180.        
  181.             player.SetQuickBarEntityShortcut(PrimGun, 1, true);
  182.             player.SetQuickBarEntityShortcut(PrimKnif, 3, true);
  183.             player.SetQuickBarEntityShortcut(PrimCan, 4, true);
  184.             player.SetQuickBarEntityShortcut(PrimComp, 5, true);
  185.             player.SetQuickBarEntityShortcut(PrimRadio, 6, true);
  186.            
  187.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  188.             if ( rand < 0.25 )
  189.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  190.             else if ( rand > 0.75 )
  191.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  192.             else
  193.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
  194.        
  195.             SetRandomHealth(itemEnt);
  196.  
  197.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  198.             if ( rand < 0.35 )
  199.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  200.             else if ( rand > 0.65 )
  201.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  202.             else
  203.             itemEnt = player.GetInventory().CreateInInventory("Plum");
  204.        
  205.             SetRandomHealth(itemEnt);
  206.         }
  207.        
  208.         /////CUSTOM LOADOUTS VIP BRONZE//////////  
  209.         for ( int p1 = 0; p1 < BronzeVIP.Count(); ++p1 )       
  210.        
  211.         if (player.GetIdentity().GetPlainId() == BronzeVIP[p1])
  212.         {
  213.             player.RemoveAllItems();           
  214.                     switch (Math.RandomInt(0, 3)) {
  215.             case 0:
  216.             EntityAI PrimHead1 = player.GetHumanInventory().CreateInInventory("DirtBikeHelmet_Khaki");         
  217.             EntityAI PrimMask1 = player.GetHumanInventory().CreateInInventory("SurgicalMask");         
  218.             EntityAI PrimHand1 = player.GetHumanInventory().CreateInInventory("WorkingGloves_Brown");          
  219.             EntityAI PrimTop1 = player.GetInventory().CreateInInventory("Raincoat_Green");
  220.             PrimTop1.GetInventory().CreateInInventory("ChernarusMap");
  221.             EntityAI PrimKnife1 = PrimTop1.GetInventory().CreateInInventory("HuntingKnife");           
  222.             PrimTop1.GetInventory().CreateInInventory("Rag");
  223.             EntityAI PrinFot1 = PrimTop1.GetInventory().CreateInInventory("BakedBeansCan");
  224.             EntityAI PrimComp1 = PrimTop1.GetInventory().CreateInInventory("Compass");
  225.             PrimTop1.GetInventory().CreateInInventory("TunaCan");
  226.             EntityAI PrimPant1 = player.GetInventory().CreateInInventory("CargoPants_Black");
  227.             EntityAI PrimBoot1 = player.GetInventory().CreateInInventory("HikingBoots_Black");         
  228.             EntityAI PrimBag1 = player.GetInventory().CreateInInventory("CourierBag");
  229.             PrimBag1.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");        
  230.             EntityAI PrimCan1 = PrimBag1.GetInventory().CreateAttachment("Canteen");
  231.             EntityAI PrimGun1 = player.GetHumanInventory().CreateInHands("MakarovIJ70");       
  232.             player.SetQuickBarEntityShortcut(PrimGun1, 0, true);
  233.             player.SetQuickBarEntityShortcut(PrimCan1, 1, true);
  234.             player.SetQuickBarEntityShortcut(PrinFot1, 2, true);
  235.             player.SetQuickBarEntityShortcut(PrimKnife1, 3, true);
  236.             player.SetQuickBarEntityShortcut(PrimComp1, 4, true);          
  237.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  238.             if ( rand < 0.25 )
  239.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  240.             else if ( rand > 0.75 )
  241.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  242.             else
  243.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  244.             SetRandomHealth(itemEnt);
  245.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  246.             if ( rand < 0.35 )
  247.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  248.             else if ( rand > 0.65 )
  249.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  250.             else
  251.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  252.             SetRandomHealth(itemEnt);
  253.             break;
  254.        
  255.         case 1:
  256.             EntityAI PrimHead11 = player.GetHumanInventory().CreateInInventory("DirtBikeHelmet_Black");        
  257.             EntityAI PrimMask11 = player.GetHumanInventory().CreateInInventory("SurgicalMask");        
  258.             EntityAI PrimHand11 = player.GetHumanInventory().CreateInInventory("WorkingGloves_Brown");         
  259.             EntityAI PrimTop11 = player.GetInventory().CreateInInventory("Raincoat_Black");
  260.             PrimTop11.GetInventory().CreateInInventory("ChernarusMap");
  261.             EntityAI PrimKnife11 = PrimTop11.GetInventory().CreateInInventory("HuntingKnife");         
  262.             PrimTop11.GetInventory().CreateInInventory("Rag");
  263.             EntityAI PrinFot11 = PrimTop11.GetInventory().CreateInInventory("BakedBeansCan");
  264.             EntityAI PrimComp11 = PrimTop11.GetInventory().CreateInInventory("Compass");
  265.             PrimTop11.GetInventory().CreateInInventory("TunaCan");
  266.             EntityAI PrimPant11 = player.GetInventory().CreateInInventory("CargoPants_Black");
  267.             EntityAI PrimBoot11 = player.GetInventory().CreateInInventory("HikingBoots_Brown");        
  268.             EntityAI PrimBag11 = player.GetInventory().CreateInInventory("CourierBag");
  269.             PrimBag11.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");           
  270.             EntityAI PrimCan11 = PrimBag11.GetInventory().CreateAttachment("Canteen");
  271.             EntityAI PrimGun11 = player.GetHumanInventory().CreateInHands("MakarovIJ70");      
  272.             player.SetQuickBarEntityShortcut(PrimGun11, 0, true);
  273.             player.SetQuickBarEntityShortcut(PrimCan11, 1, true);
  274.             player.SetQuickBarEntityShortcut(PrinFot11, 2, true);
  275.             player.SetQuickBarEntityShortcut(PrimKnife11, 3, true);
  276.             player.SetQuickBarEntityShortcut(PrimComp11, 4, true);         
  277.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  278.             if ( rand < 0.25 )
  279.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  280.             else if ( rand > 0.75 )
  281.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  282.             else
  283.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  284.             SetRandomHealth(itemEnt);
  285.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  286.             if ( rand < 0.35 )
  287.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  288.             else if ( rand > 0.65 )
  289.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  290.             else
  291.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  292.             SetRandomHealth(itemEnt);
  293.             break;
  294.            
  295.         case 2:
  296.             EntityAI PrimHead12 = player.GetHumanInventory().CreateInInventory("DirtBikeHelmet_Red");          
  297.             EntityAI PrimMask12 = player.GetHumanInventory().CreateInInventory("SurgicalMask");        
  298.             EntityAI PrimHand12 = player.GetHumanInventory().CreateInInventory("WorkingGloves_Yellow");        
  299.             EntityAI PrimTop12 = player.GetInventory().CreateInInventory("Raincoat_Orange");
  300.             PrimTop12.GetInventory().CreateInInventory("ChernarusMap");
  301.             EntityAI PrimKnife12 = PrimTop12.GetInventory().CreateInInventory("HuntingKnife");         
  302.             PrimTop12.GetInventory().CreateInInventory("Rag");
  303.             EntityAI PrinFot12 = PrimTop12.GetInventory().CreateInInventory("BakedBeansCan");
  304.             EntityAI PrimComp12 = PrimTop12.GetInventory().CreateInInventory("Compass");
  305.             PrimTop12.GetInventory().CreateInInventory("TunaCan");
  306.             EntityAI PrimPant12 = player.GetInventory().CreateInInventory("CargoPants_Black");
  307.             EntityAI PrimBoot12 = player.GetInventory().CreateInInventory("HikingBootsLow_Blue");          
  308.             EntityAI PrimBag12 = player.GetInventory().CreateInInventory("CourierBag");
  309.             PrimBag12.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");           
  310.             EntityAI PrimCan12 = PrimBag12.GetInventory().CreateAttachment("Canteen");
  311.             EntityAI PrimGun12 = player.GetHumanInventory().CreateInHands("MakarovIJ70");      
  312.             player.SetQuickBarEntityShortcut(PrimGun1, 0, true);
  313.             player.SetQuickBarEntityShortcut(PrimCan1, 1, true);
  314.             player.SetQuickBarEntityShortcut(PrinFot1, 2, true);
  315.             player.SetQuickBarEntityShortcut(PrimKnife1, 3, true);
  316.             player.SetQuickBarEntityShortcut(PrimComp1, 4, true);          
  317.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  318.             if ( rand < 0.25 )
  319.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  320.             else if ( rand > 0.75 )
  321.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  322.             else
  323.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  324.             SetRandomHealth(itemEnt);
  325.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  326.             if ( rand < 0.35 )
  327.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  328.             else if ( rand > 0.65 )
  329.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  330.             else
  331.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  332.             SetRandomHealth(itemEnt);
  333.             break;
  334.            
  335.             }
  336.  
  337.         }
  338.  
  339.         /////CUSTOM LOADOUTS VIP SILVER//////////
  340.         for ( int p2 = 0; p2 < SilverVIP.Count(); ++p2 )       
  341.        
  342.         if (player.GetIdentity().GetPlainId() == SilverVIP[p2])
  343.         {
  344.             player.RemoveAllItems();           
  345.                     switch (Math.RandomInt(0, 3)) {
  346.         case 0:
  347.             EntityAI PrimHead2 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_Black");
  348.             EntityAI PrimMask2 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");        
  349.             EntityAI PrimHand2 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Green");
  350.             EntityAI PrimVest2 = player.GetHumanInventory().CreateInInventory("PoliceVest");           
  351.             EntityAI PrimTop2 = player.GetInventory().CreateInInventory("TacticalShirt_Black");
  352.             PrimTop2.GetInventory().CreateInInventory("ChernarusMap");
  353.             EntityAI PrinFot2 = PrimTop2.GetInventory().CreateInInventory("TacticalBaconCan");
  354.             PrimTop2.GetInventory().CreateInInventory("TunaCan");          
  355.             PrimTop2.GetInventory().CreateInInventory("TunaCan");          
  356.             EntityAI PrimBanda2 = PrimTop2.GetInventory().CreateInInventory("BandageDressing");
  357.             EntityAI PrimComp2 = PrimTop2.GetInventory().CreateInInventory("Compass");
  358.             EntityAI PrimPant2 = player.GetInventory().CreateInInventory("CargoPants_Black");
  359.             EntityAI PrimBoot2 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
  360.             EntityAI PrimKnife2 = PrimBoot2.GetInventory().CreateAttachment("CombatKnife");
  361.             EntityAI PrimAxe2 = player.GetInventory().CreateInInventory("WoodAxe");        
  362.             EntityAI PrimBag2 = player.GetInventory().CreateInInventory("DryBag_Black");
  363.             EntityAI PrimCan2 = PrimBag2.GetInventory().CreateInInventory("Canteen");
  364.             EntityAI PrimGun2 = player.GetHumanInventory().CreateInHands("Repeater");          
  365.             PrimTop2.GetInventory().CreateInInventory("Ammo_357");                 
  366.             PrimTop2.GetInventory().CreateInInventory("Rag");                  
  367.             player.SetQuickBarEntityShortcut(PrimGun2, 0, true);
  368.             player.SetQuickBarEntityShortcut(PrimCan2, 1, true);
  369.             player.SetQuickBarEntityShortcut(PrinFot2, 2, true);
  370.             player.SetQuickBarEntityShortcut(PrimKnife2, 3, true);
  371.             player.SetQuickBarEntityShortcut(PrimComp2, 4, true);          
  372.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  373.             if ( rand < 0.25 )
  374.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  375.             else if ( rand > 0.75 )
  376.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  377.             else
  378.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  379.             SetRandomHealth(itemEnt);
  380.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  381.             if ( rand < 0.35 )
  382.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  383.             else if ( rand > 0.65 )
  384.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  385.             else
  386.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  387.             SetRandomHealth(itemEnt);
  388.             break;
  389.            
  390.         case 1:
  391.             EntityAI PrimHead21 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_Black");
  392.             EntityAI PrimMask21 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");           
  393.             EntityAI PrimHand21 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Beige");
  394.             EntityAI PrimVest21 = player.GetHumanInventory().CreateInInventory("PoliceVest");          
  395.             EntityAI PrimTop21 = player.GetInventory().CreateInInventory("TacticalShirt_Tan");
  396.             PrimTop21.GetInventory().CreateInInventory("ChernarusMap");
  397.             EntityAI PrinFot21 = PrimTop21.GetInventory().CreateInInventory("TacticalBaconCan");
  398.             PrimTop21.GetInventory().CreateInInventory("TunaCan");         
  399.             PrimTop21.GetInventory().CreateInInventory("TunaCan");         
  400.             EntityAI PrimBanda21 = PrimTop21.GetInventory().CreateInInventory("BandageDressing");
  401.             EntityAI PrimComp21 = PrimTop21.GetInventory().CreateInInventory("Compass");
  402.             EntityAI PrimPant21 = player.GetInventory().CreateInInventory("CargoPants_Black");
  403.             EntityAI PrimBoot21 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
  404.             EntityAI PrimKnife21 = PrimBoot21.GetInventory().CreateAttachment("CombatKnife");
  405.             EntityAI PrimAxe21 = player.GetInventory().CreateInInventory("WoodAxe");           
  406.             EntityAI PrimBag21 = player.GetInventory().CreateInInventory("DryBag_Black");
  407.             EntityAI PrimCan21 = PrimBag21.GetInventory().CreateInInventory("Canteen");
  408.             EntityAI PrimGun21 = player.GetHumanInventory().CreateInHands("Repeater");         
  409.             PrimTop21.GetInventory().CreateInInventory("Ammo_357");                
  410.             PrimTop21.GetInventory().CreateInInventory("Rag");                 
  411.             player.SetQuickBarEntityShortcut(PrimGun21, 0, true);
  412.             player.SetQuickBarEntityShortcut(PrimCan21, 1, true);
  413.             player.SetQuickBarEntityShortcut(PrinFot21, 2, true);
  414.             player.SetQuickBarEntityShortcut(PrimKnife21, 3, true);
  415.             player.SetQuickBarEntityShortcut(PrimComp21, 4, true);         
  416.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  417.             if ( rand < 0.25 )
  418.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  419.             else if ( rand > 0.75 )
  420.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  421.             else
  422.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  423.             SetRandomHealth(itemEnt);
  424.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  425.             if ( rand < 0.35 )
  426.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  427.             else if ( rand > 0.65 )
  428.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  429.             else
  430.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  431.             SetRandomHealth(itemEnt);
  432.             break;
  433.            
  434.         case 2:
  435.             EntityAI PrimHead22 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_UN");
  436.             EntityAI PrimMask22 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");           
  437.             EntityAI PrimHand22 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Black");
  438.             EntityAI PrimVest22 = player.GetHumanInventory().CreateInInventory("PoliceVest");          
  439.             EntityAI PrimTop22 = player.GetInventory().CreateInInventory("PolicejacketOrel");
  440.             PrimTop22.GetInventory().CreateInInventory("ChernarusMap");
  441.             EntityAI PrinFot22 = PrimTop22.GetInventory().CreateInInventory("TacticalBaconCan");
  442.             PrimTop22.GetInventory().CreateInInventory("TunaCan");         
  443.             PrimTop22.GetInventory().CreateInInventory("TunaCan");         
  444.             EntityAI PrimBanda22 = PrimTop22.GetInventory().CreateInInventory("BandageDressing");
  445.             EntityAI PrimComp22 = PrimTop22.GetInventory().CreateInInventory("Compass");
  446.             EntityAI PrimPant22 = player.GetInventory().CreateInInventory("PolicePantsOrel");
  447.             EntityAI PrimBoot22 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
  448.             EntityAI PrimKnife22 = PrimBoot22.GetInventory().CreateAttachment("CombatKnife");
  449.             EntityAI PrimAxe22 = player.GetInventory().CreateInInventory("WoodAxe");           
  450.             EntityAI PrimBag22 = player.GetInventory().CreateInInventory("DryBag_Black");
  451.             EntityAI PrimCan22 = PrimBag22.GetInventory().CreateInInventory("Canteen");
  452.             EntityAI PrimGun22 = player.GetHumanInventory().CreateInHands("Repeater");         
  453.             PrimTop2.GetInventory().CreateInInventory("Ammo_357");                 
  454.             PrimTop2.GetInventory().CreateInInventory("Rag");                  
  455.             player.SetQuickBarEntityShortcut(PrimGun22, 0, true);
  456.             player.SetQuickBarEntityShortcut(PrimCan22, 1, true);
  457.             player.SetQuickBarEntityShortcut(PrinFot22, 2, true);
  458.             player.SetQuickBarEntityShortcut(PrimKnife22, 3, true);
  459.             player.SetQuickBarEntityShortcut(PrimComp22, 4, true);         
  460.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  461.             if ( rand < 0.25 )
  462.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  463.             else if ( rand > 0.75 )
  464.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  465.             else
  466.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  467.             SetRandomHealth(itemEnt);
  468.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  469.             if ( rand < 0.35 )
  470.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  471.             else if ( rand > 0.65 )
  472.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  473.             else
  474.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  475.             SetRandomHealth(itemEnt);
  476.             break;
  477.            
  478.         case 3:        
  479.             EntityAI PrimHead23 = player.GetHumanInventory().CreateInInventory("BallisticHelmet_Black");
  480.             EntityAI PrimMask23 = player.GetHumanInventory().CreateInInventory("NioshFaceMask");           
  481.             EntityAI PrimHand23 = player.GetHumanInventory().CreateInInventory("TacticalGloves_Green");
  482.             EntityAI PrimVest23 = player.GetHumanInventory().CreateInInventory("PoliceVest");          
  483.             EntityAI PrimTop23 = player.GetInventory().CreateInInventory("TacticalShirt_Black");
  484.             PrimTop23.GetInventory().CreateInInventory("ChernarusMap");
  485.             EntityAI PrinFot23 = PrimTop23.GetInventory().CreateInInventory("TacticalBaconCan");
  486.             PrimTop23.GetInventory().CreateInInventory("TunaCan");         
  487.             PrimTop23.GetInventory().CreateInInventory("TunaCan");         
  488.             EntityAI PrimBanda23 = PrimTop23.GetInventory().CreateInInventory("BandageDressing");
  489.             EntityAI PrimComp23 = PrimTop23.GetInventory().CreateInInventory("Compass");
  490.             EntityAI PrimPant23 = player.GetInventory().CreateInInventory("CargoPants_Black");
  491.             EntityAI PrimBoot23 = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
  492.             EntityAI PrimKnife23 = PrimBoot23.GetInventory().CreateAttachment("CombatKnife");
  493.             EntityAI PrimAxe23 = player.GetInventory().CreateInInventory("WoodAxe");           
  494.             EntityAI PrimBag23 = player.GetInventory().CreateInInventory("DryBag_Black");
  495.             EntityAI PrimCan23 = PrimBag23.GetInventory().CreateInInventory("Canteen");
  496.             EntityAI PrimGun23 = player.GetHumanInventory().CreateInHands("Repeater");         
  497.             PrimTop23.GetInventory().CreateInInventory("Ammo_357");                
  498.             PrimTop23.GetInventory().CreateInInventory("Rag");                 
  499.             player.SetQuickBarEntityShortcut(PrimGun23, 0, true);
  500.             player.SetQuickBarEntityShortcut(PrimCan23, 1, true);
  501.             player.SetQuickBarEntityShortcut(PrinFot23, 2, true);
  502.             player.SetQuickBarEntityShortcut(PrimKnife23, 3, true);
  503.             player.SetQuickBarEntityShortcut(PrimComp23, 4, true);         
  504.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  505.             if ( rand < 0.25 )
  506.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  507.             else if ( rand > 0.75 )
  508.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  509.             else
  510.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");        
  511.             SetRandomHealth(itemEnt);
  512.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  513.             if ( rand < 0.35 )
  514.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  515.             else if ( rand > 0.65 )
  516.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  517.             else
  518.             itemEnt = player.GetInventory().CreateInInventory("Plum");        
  519.             SetRandomHealth(itemEnt);
  520.             break;
  521.                     }
  522.  
  523.         }
  524.  
  525.         ///// CUSTOM LOADOUTS VIP APOCALYSE ////////// 
  526.         for ( int p3 = 0; p3 < ApoVIP.Count(); ++p3 )      
  527.        
  528.         if (player.GetIdentity().GetPlainId() == ApoVIP[p3])
  529.         {
  530.             player.RemoveAllItems();
  531.            
  532.             EntityAI PrimHead3 = player.GetHumanInventory().CreateInInventory("Mich2001Helmet")
  533.  
  534.             EntityAI PrimMask3 = player.GetHumanInventory().CreateInInventory("GasMask")
  535.            
  536.             EntityAI PrimHand3 = player.GetHumanInventory().CreateInInventory("OMNOGloves_Gray")
  537.  
  538.             EntityAI PrimBelt3 = player.GetHumanInventory().CreateAttachment("MilitaryBelt");
  539.            
  540.             EntityAI PrimCan3 = PrimBelt3.GetInventory().CreateAttachment("Canteen");
  541.  
  542.             EntityAI PrimVest3 = player.GetHumanInventory().CreateInInventory("HighCapacityVest_Olive")
  543.             EntityAI PrimSali3 = PrimVest3.GetInventory().CreateInInventory("SalineBagIV");
  544.             PrimVest3.GetInventory().CreateInInventory("Heatpack");
  545.             PrimVest3.GetInventory().CreateInInventory("Matchbox");
  546.             EntityAI PrimBanda3 = PrimVest3.GetInventory().CreateInInventory("BandageDressing");
  547.             PrimVest3.GetInventory().CreateInInventory("BandageDressing");
  548.            
  549.             EntityAI PrimTop3 = player.GetInventory().CreateInInventory("HuntingJacket_Summer");
  550.             PrimTop3.GetInventory().CreateInInventory("ChernarusMap");
  551.             EntityAI PrinFot3 = PrimTop3.GetInventory().CreateInInventory("TacticalBaconCan");
  552.             PrimTop3.GetInventory().CreateInInventory("TacticalBaconCan");         
  553.             PrimTop3.GetInventory().CreateInInventory("TunaCan");          
  554.             PrimTop3.GetInventory().CreateInInventory("SardinesCan");          
  555.             EntityAI PrimComp3 = PrimTop3.GetInventory().CreateInInventory("Compass");
  556.             EntityAI PrimPant3 = player.GetInventory().CreateInInventory("HunterPants_Summer");
  557.             EntityAI PrimBoot3 = player.GetInventory().CreateInInventory("MilitaryBoots_Brown");
  558.             EntityAI PrimKnife3 = PrimBoot3.GetInventory().CreateAttachment("CombatKnife");
  559.             EntityAI PrimShov3 = player.GetInventory().CreateInInventory("Shovel");
  560.             EntityAI PrimHatc3 = player.GetInventory().CreateInInventory("Hatchet");
  561.            
  562.             EntityAI PrimBag3 = player.GetInventory().CreateInInventory("HuntingBag");
  563.  
  564.             EntityAI PrimGun3 = player.GetHumanInventory().CreateInHands("SKS");
  565.            
  566.             itemEnt = PrimVest3.GetInventory().CreateInInventory("Ammo_762x39");
  567.             if ( Class.CastTo(itemBs, itemEnt ) )
  568.                 itemBs.SetQuantity(15);
  569.            
  570.             itemEnt = PrimVest3.GetInventory().CreateInInventory("Ammo_762x39");
  571.             if ( Class.CastTo(itemBs, itemEnt ) )
  572.                 itemBs.SetQuantity(15);
  573.        
  574.             player.SetQuickBarEntityShortcut(PrimGun3, 0, true);
  575.             player.SetQuickBarEntityShortcut(PrimCan3, 1, true);
  576.             player.SetQuickBarEntityShortcut(PrinFot3, 2, true);
  577.             player.SetQuickBarEntityShortcut(PrimKnife3, 3, true);
  578.             player.SetQuickBarEntityShortcut(PrimComp3, 4, true);
  579.             player.SetQuickBarEntityShortcut(PrimBanda3, 5, true);
  580.             player.SetQuickBarEntityShortcut(PrimHatc3, 6, true);
  581.             player.SetQuickBarEntityShortcut(PrimShov3, 7, true);
  582.             player.SetQuickBarEntityShortcut(PrimSali3, 8, true);
  583.            
  584.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  585.             if ( rand < 0.25 )
  586.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola");
  587.             else if ( rand > 0.75 )
  588.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite");
  589.             else
  590.             itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi");
  591.        
  592.             SetRandomHealth(itemEnt);
  593.  
  594.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  595.             if ( rand < 0.35 )
  596.             itemEnt = player.GetInventory().CreateInInventory("Apple");
  597.             else if ( rand > 0.65 )
  598.             itemEnt = player.GetInventory().CreateInInventory("Pear");
  599.             else
  600.             itemEnt = player.GetInventory().CreateInInventory("Plum");
  601.        
  602.             SetRandomHealth(itemEnt);
  603.         }
  604.        
  605.  
  606.         switch (Math.RandomInt(10, 19)) {
  607.         case 10:
  608.         // Soldier
  609.         player.GetInventory().CreateInInventory("TTSKOPants");itemBs = ItemBase.Cast(itemEnt);
  610.         player.GetInventory().CreateInInventory("TShirt_Green");itemBs = ItemBase.Cast(itemEnt);
  611.         player.GetInventory().CreateInInventory("MilitaryBoots_Black");itemBs = ItemBase.Cast(itemEnt);
  612.         player.GetInventory().CreateInInventory("TacticalBaconCan");itemBs = ItemBase.Cast(itemEnt);
  613.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  614.         EntityAI kn = player.GetHumanInventory().CreateInHands("CombatKnife");itemBs = ItemBase.Cast(itemEnt);
  615.             player.SetQuickBarEntityShortcut(kn, 0, true);
  616.         break;
  617.         case 11:
  618.         // Paramedic
  619.         player.GetInventory().CreateInInventory("SurgicalMask");itemBs = ItemBase.Cast(itemEnt);
  620.         player.GetInventory().CreateInInventory("SurgicalGloves_Green");itemBs = ItemBase.Cast(itemEnt);
  621.         player.GetInventory().CreateInInventory("ParamedicPants_Green");itemBs = ItemBase.Cast(itemEnt);
  622.         player.GetInventory().CreateInInventory("ParamedicJacket_Green");itemBs = ItemBase.Cast(itemEnt);
  623.         player.GetInventory().CreateInInventory("SalineBagIV");itemBs = ItemBase.Cast(itemEnt);
  624.         player.GetInventory().CreateInInventory("BandageDressing");itemBs = ItemBase.Cast(itemEnt);
  625.         player.GetInventory().CreateInInventory("AthleticShoes_Green");itemBs = ItemBase.Cast(itemEnt);
  626.         EntityAI kn1 = player.GetHumanInventory().CreateInHands("SteakKnife");itemBs = ItemBase.Cast(itemEnt);
  627.             player.SetQuickBarEntityShortcut(kn1, 0, true);
  628.         break;
  629.         case 12:
  630.         // Office worker
  631.         player.GetInventory().CreateInInventory("SlacksPants_Black");itemBs = ItemBase.Cast(itemEnt);
  632.         player.GetInventory().CreateInInventory("ManSuit_Black");itemBs = ItemBase.Cast(itemEnt);
  633.         player.GetInventory().CreateInInventory("DressShoes_Black");itemBs = ItemBase.Cast(itemEnt);
  634.         player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
  635.         player.GetInventory().CreateInInventory("TunaCan");itemBs = ItemBase.Cast(itemEnt);
  636.         player.GetInventory().CreateInInventory("ThinFramesGlasses");itemBs = ItemBase.Cast(itemEnt);
  637.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  638.         EntityAI kn2 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
  639.             player.SetQuickBarEntityShortcut(kn2, 0, true);
  640.         break;
  641.         case 13:
  642.         // Biker
  643.         player.GetInventory().CreateInInventory("Jeans_Black");itemBs = ItemBase.Cast(itemEnt);
  644.         player.GetInventory().CreateInInventory("RidersJacket_Black");itemBs = ItemBase.Cast(itemEnt);
  645.         player.GetInventory().CreateInInventory("MotoHelmet_Red");itemBs = ItemBase.Cast(itemEnt);
  646.         player.GetInventory().CreateInInventory("HikingBootsLow_Black");itemBs = ItemBase.Cast(itemEnt);
  647.         player.GetInventory().CreateInInventory("Matchbox");itemBs = ItemBase.Cast(itemEnt);
  648.         player.GetInventory().CreateInInventory("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
  649.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  650.         EntityAI kn3 = player.GetHumanInventory().CreateInHands("NailedBaseballBat");itemBs = ItemBase.Cast(itemEnt);
  651.             player.SetQuickBarEntityShortcut(kn3, 0, true);
  652.         break;
  653.         case 14:
  654.         // Hiker
  655.         player.GetInventory().CreateInInventory("Ushanka_Black");itemBs = ItemBase.Cast(itemEnt);
  656.         player.GetInventory().CreateInInventory("HikingJacket_Red");itemBs = ItemBase.Cast(itemEnt);
  657.         player.GetInventory().CreateInInventory("AthleticShoes_Blue");itemBs = ItemBase.Cast(itemEnt);
  658.         player.GetInventory().CreateInInventory("CargoPants_Blue");itemBs = ItemBase.Cast(itemEnt);
  659.         player.GetInventory().CreateInInventory("CivilianBelt");itemBs = ItemBase.Cast(itemEnt);
  660.         player.GetInventory().CreateInInventory("Heatpack");itemBs = ItemBase.Cast(itemEnt);
  661.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  662.         EntityAI kn4 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
  663.             player.SetQuickBarEntityShortcut(kn4, 0, true);
  664.         break;
  665.         case 15:
  666.         // Cop
  667.         player.GetInventory().CreateInInventory("PoliceCap");itemBs = ItemBase.Cast(itemEnt);
  668.         player.GetInventory().CreateInInventory("PoliceJacket");itemBs = ItemBase.Cast(itemEnt);
  669.         player.GetInventory().CreateInInventory("PolicePants");itemBs = ItemBase.Cast(itemEnt);
  670.         player.GetInventory().CreateInInventory("CombatBoots_Grey");itemBs = ItemBase.Cast(itemEnt);
  671.         player.GetInventory().CreateInInventory("Handcuffs");itemBs = ItemBase.Cast(itemEnt);
  672.         player.GetInventory().CreateInInventory("HandcuffKeys");itemBs = ItemBase.Cast(itemEnt);
  673.         player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);
  674.         player.GetInventory().CreateInInventory("PersonalRadio");itemBs = ItemBase.Cast(itemEnt);
  675.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  676.         EntityAI kn5 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
  677.             player.SetQuickBarEntityShortcut(kn5, 0, true);
  678.         break;
  679.         case 16:
  680.         // Lumberjack
  681.         player.GetInventory().CreateInInventory("Shirt_RedCheck");itemBs = ItemBase.Cast(itemEnt);
  682.         player.GetInventory().CreateInInventory("Jeans_Blue");itemBs = ItemBase.Cast(itemEnt);
  683.         player.GetInventory().CreateInInventory("WorkingBoots_Brown");itemBs = ItemBase.Cast(itemEnt);
  684.         player.GetInventory().CreateInInventory("Ushanka_Green");itemBs = ItemBase.Cast(itemEnt);
  685.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  686.         EntityAI kn6 = player.GetHumanInventory().CreateInHands("Hatchet");itemBs = ItemBase.Cast(itemEnt);
  687.             player.SetQuickBarEntityShortcut(kn6, 0, true);
  688.         break;
  689.        
  690.         case 17:
  691.         // Hood
  692.         player.GetInventory().CreateInInventory("Crowbar");itemBs = ItemBase.Cast(itemEnt);
  693.         player.GetInventory().CreateInInventory("WorkingGloves_Black");itemBs = ItemBase.Cast(itemEnt);
  694.         player.GetInventory().CreateInInventory("Balaclava3Holes_Black");itemBs = ItemBase.Cast(itemEnt);
  695.         player.GetInventory().CreateInInventory("TrackSuitPants_Black");itemBs = ItemBase.Cast(itemEnt);
  696.         player.GetInventory().CreateInInventory("TShirt_White");itemBs = ItemBase.Cast(itemEnt);
  697.         player.GetInventory().CreateInInventory("AthleticShoes_Black");itemBs = ItemBase.Cast(itemEnt);
  698.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  699.         EntityAI kn7 = player.GetHumanInventory().CreateInHands("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);
  700.             player.SetQuickBarEntityShortcut(kn7, 0, true);
  701.         break;
  702.         case 18:
  703.         // Fireman
  704.         player.GetInventory().CreateInInventory("FirefighterJacket_Beige");itemBs = ItemBase.Cast(itemEnt);
  705.         player.GetInventory().CreateInInventory("FirefightersPants_Beige");itemBs = ItemBase.Cast(itemEnt);
  706.         player.GetInventory().CreateInInventory("FirefightersHelmet_White");itemBs = ItemBase.Cast(itemEnt);
  707.         player.GetInventory().CreateInInventory("WorkingBoots_Yellow");itemBs = ItemBase.Cast(itemEnt);
  708.         player.GetInventory().CreateInInventory("Rag");itemBs = ItemBase.Cast(itemEnt);
  709.         EntityAI fa8 = player.GetHumanInventory().CreateInHands("FirefighterAxe");itemBs = ItemBase.Cast(itemEnt);
  710.             player.SetQuickBarEntityShortcut(fa8, 0, true);
  711.         break;
  712.                
  713.         }
  714.        
  715.         // Give universal gear
  716.         player.GetInventory().CreateInInventory("WaterBottle");
  717.         player.GetInventory().CreateInInventory("TunaCan");
  718.         player.GetInventory().CreateInInventory("ChernarusMap");
  719.  
  720.             string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
  721.             int rndIndex = Math.RandomInt(0, 4);
  722.             itemEnt = player.GetInventory().CreateInInventory(chemlightArray[rndIndex]);
  723.             SetRandomHealth(itemEnt);
  724.  
  725.             rand = Math.RandomFloatInclusive(0.0, 1.0);
  726.             if ( rand < 0.35 )
  727.                 itemEnt = player.GetInventory().CreateInInventory("Apple");
  728.             else if ( rand > 0.65 )
  729.                 itemEnt = player.GetInventory().CreateInInventory("Pear");
  730.             else
  731.                 itemEnt = player.GetInventory().CreateInInventory("Plum");
  732.  
  733.             SetRandomHealth(itemEnt);
  734.        
  735.  
  736.     }
  737. };
  738.  
  739. Mission CreateCustomMission(string path)
  740. {
  741.     return new CustomMission();
  742. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement