Advertisement
Guest User

New Loadout 4.0

a guest
Sep 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. void main()
  2. {
  3.  
  4. Hive ce = CreateHive();
  5. if ( ce )
  6. ce.InitOffline();
  7.  
  8. Weather weather = g_Game.GetWeather();
  9.  
  10. weather.GetOvercast().SetLimits( 0.0 , 1.0 );
  11. weather.GetRain().SetLimits( 0.0 , 1.0 );
  12. weather.GetFog().SetLimits( 0.0 , 0.25 );
  13.  
  14. weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );
  15. weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );
  16. weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );
  17.  
  18. weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
  19. weather.GetRain().SetForecastTimeLimits( 600 , 600 );
  20. weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );
  21.  
  22. weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
  23. weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
  24. weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
  25.  
  26. weather.SetWindMaximumSpeed(15);
  27. weather.SetWindFunctionParams(0.1, 0.3, 50);
  28. }
  29.  
  30. class CustomMission: MissionServer
  31. {
  32. override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
  33. {
  34. Entity playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");
  35. Class.CastTo(m_player, playerEnt);
  36.  
  37. GetGame().SelectPlayer(identity, m_player);
  38.  
  39. return m_player;
  40. }
  41.  
  42. void addMags(PlayerBase player, string mag_type, int count) {
  43. for (int i = 0; i < count; i++) {
  44. player.GetInventory().CreateInInventory(mag_type);
  45. }
  46. }
  47.  
  48. EntityAI assaultClass(PlayerBase player) {
  49. EntityAI gun = player.GetInventory().CreateInInventory("M4A1");
  50. gun.GetInventory().CreateAttachment("M4_RISHndgrd_Black");
  51. gun.GetInventory().CreateAttachment("M4_MPBttstck_Black");
  52. gun.GetInventory().CreateAttachment("ACOGOptic");
  53. gun.GetInventory().CreateAttachment("M4_Suppressor");
  54. addMags(player, "Mag_STANAG_30Rnd", 3);
  55. player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  56. player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  57. player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  58. player.GetInventory().CreateInInventory("M68Optic");
  59. player.GetInventory().CreateInInventory("Battery9V");
  60.  
  61.  
  62. return gun;
  63. }
  64.  
  65. EntityAI sniperClass(PlayerBase player) {
  66. EntityAI gun = player.GetInventory().CreateInInventory("SVD");
  67. gun.GetInventory().CreateAttachment("PSO1Optic");
  68. addMags(player, "Mag_SVD_10Rnd", 3);
  69. player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
  70. player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
  71. player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
  72.  
  73. return gun;
  74. }
  75.  
  76. EntityAI smgClass(PlayerBase player) {
  77. EntityAI gun = player.GetInventory().CreateInInventory("AKM");
  78. gun.GetInventory().CreateAttachment("AK_Suppressor");
  79. gun.GetInventory().CreateAttachment("PSO1Optic");
  80. gun.GetInventory().CreateAttachment("AK_WoodBttstck");
  81. gun.GetInventory().CreateAttachment("AK_WoodHndgrd");
  82. addMags(player, "Mag_AKM_30Rnd", 3);
  83. player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
  84. player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
  85. player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
  86. player.GetInventory().CreateInInventory("KobraOptic");
  87.  
  88. return gun;
  89. }
  90.  
  91. override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
  92. {
  93. player.RemoveAllItems();
  94.  
  95. player.GetInventory().CreateInInventory("CargoPants_Black");
  96. player.GetInventory().CreateInInventory("TacticalShirt_Black");
  97. player.GetInventory().CreateInInventory("CombatBoots_Beige");
  98. player.GetInventory().CreateInInventory("AssaultBag_Black");
  99. player.GetInventory().CreateInInventory("BoonieHat_Black");
  100. player.GetInventory().CreateInInventory("UKAssVest_Black");
  101.  
  102.  
  103. player.GetInventory().CreateInInventory("SodaCan_Pipsi");
  104. player.GetInventory().CreateInInventory("SpaghettiCan");
  105. player.GetInventory().CreateInInventory("CanOpener");
  106. player.GetInventory().CreateInInventory("SalineBagIV");
  107. player.GetInventory().CreateInInventory("SalineBagIV");
  108.  
  109. EntityAI rags = player.GetInventory().CreateInInventory("Rag");
  110. ItemBase.Cast(rags).SetQuantity(4);
  111.  
  112.  
  113.  
  114. switch (Math.RandomInt(0, 3)) {
  115. case 0: primary = assaultClass(player); break;
  116. case 1: primary = sniperClass(player); break;
  117. case 2: primary = smgClass(player); break;
  118. }
  119.  
  120. player.LocalTakeEntityToHands(primary);
  121. player.SetQuickBarEntityShortcut(primary, 0, true);
  122. player.SetQuickBarEntityShortcut(rags, 2, true);
  123. player.SetQuickBarEntityShortcut(axe, 3, true);
  124. }
  125. };
  126.  
  127. Mission CreateCustomMission(string path)
  128. {
  129. return new CustomMission();
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement