iKurdo

init.c

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