Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.64 KB | None | 0 0
  1.  
  2. local function AddWeapon(tab)
  3.     tab.UseText = "Equip"
  4.     tab.OnUse = function(ply)
  5.         ply:Give(tab.Class)
  6.     end
  7.     tab.Weight = tab.Weight or 10
  8.     tab.Price = tab.Price or 800
  9.     tab.IsWeapon = true
  10.     tab.Color = Color(75, 119, 190)
  11.     Items.New(tab)
  12. end
  13.  
  14. local function AddAmmo(tab)
  15.     tab.UseText = "Equip"
  16.     tab.OnUse = function(ply)
  17.         ply:GiveAmmo(tab.Amount, tab.AmmoType)
  18.     end
  19.     tab.Weight = 4
  20.     tab.Price = tab.Price or 300
  21.     tab.Color = Color(255, 0, 0)
  22.     Items.New(tab)
  23. end
  24.  
  25. local teamGun = {
  26.     [2] = true
  27. }
  28.  
  29. local teamBMD = {
  30.     [4] = true
  31. }
  32.  
  33. local teamAll = {
  34.     [4] = true,
  35.     [2] = true
  36. }
  37.  
  38. AddAmmo({
  39.     Name = "Rifle Ammunition",
  40.     Weight = 3,
  41.     Price = 110,
  42.     AmmoType = "HRP Rifle Ammo",
  43.     Amount = 30,
  44.     Description = "30 rounds of rifle ammunition which are used for any rifle.",
  45.     Model = "models/Items/BoxMRounds.mdl",
  46.     Teams = {
  47.         [6] = true,
  48.         [7] = true,
  49.         [4] = true,
  50.         [2] = true
  51.     }
  52. })
  53.  
  54. AddAmmo({
  55.     Name = "RPG",
  56.     Weight = 4,
  57.     Price = 500,
  58.     AmmoType = "RPG_Round",
  59.     Amount = 1,
  60.     Description = "A single rocket propelled grenade.",
  61.     Model = "models/weapons/w_missile_closed.mdl",
  62.     Teams = {
  63.         [4] = true
  64.     }
  65. })
  66.  
  67. AddAmmo({
  68.     Name = "Pistol Ammunition",
  69.     Weight = 1,
  70.     Price = 100,
  71.     AmmoType = "HRP Pistol Ammo",
  72.     Amount = 24,
  73.     Description = "24 rounds of pistol ammunition that can be used for pistols and revolvers.",
  74.     Model = "models/Items/BoxSRounds.mdl",
  75.     Teams = teamAll
  76. })
  77.  
  78. AddAmmo({
  79.     Name = "Shotgun Rounds",
  80.     Weight = 2,
  81.     Price = 105,
  82.     AmmoType = "HRP Shotgun Ammo",
  83.     Amount = 10,
  84.     Description = "10 rounds of shotgun ammunition which fit all shotguns.",
  85.     Model = "models/Items/BoxBuckshot.mdl",
  86.     Teams = teamAll
  87. })
  88.  
  89. AddWeapon({
  90.     Name = "AK-47",
  91.     Description = "The iconic Russian assault rifle, but this time with a Red Dot sight attached.",
  92.     Weight = 14,
  93.     Price = 1100,
  94.     Class = "m9k_ak47",
  95.     Model = "models/weapons/w_ak47_m9k.mdl",
  96.     Teams = teamBMD
  97. })
  98.  
  99. AddWeapon({
  100.     Name = "AK-74",
  101.     Description = "An updated version of the Ak-47 assault rifle.",
  102.     Weight = 14,
  103.     Price = 1000,
  104.     Class = "m9k_ak74",
  105.     Model = "models/weapons/w_tct_ak47.mdl",
  106.     Teams = teamBMD
  107. })
  108.  
  109. AddWeapon({
  110.     Name = "PKM",
  111.     Description = "A large russian LMG based around the AK.",
  112.     Weight = 20,
  113.     Price = 2200,
  114.     Class = "m9k_pkm",
  115.     Model = "models/weapons/w_mach_russ_pkm.mdl",
  116.     Teams = teamBMD
  117. })
  118.  
  119. AddWeapon({
  120.     Name = "RPG-7",
  121.     Description = "A russian rocket unguided rocket launcher.",
  122.     Weight = 15,
  123.     Price = 2000,
  124.     Class = "m9k_rpg7",
  125.     Model = "models/weapons/w_gdc_rpg7.mdl",
  126.     Teams = teamBMD
  127. })
  128.  
  129. AddWeapon({
  130.     Name = "AMD 65",
  131.     Description = "An illegal rifle with a very fast fire rate.",
  132.     Weight = 15,
  133.     Price = 1300,
  134.     Class = "m9k_amd65",
  135.     Model = "models/weapons/w_amd_65.mdl",
  136.     Teams = teamBMD
  137. })
  138.  
  139. AddWeapon({
  140.     Name = "AN-94",
  141.     Description = "An automatic assault rifle.",
  142.     Weight = 14,
  143.     Price = 1250,
  144.     Class = "m9k_an94",
  145.     Model = "models/weapons/w_rif_an_94.mdl",
  146.     Teams = teamBMD
  147. })
  148.  
  149. AddWeapon({
  150.     Name = "Nerve Gas",
  151.     Description = "Bottled mustard gas.",
  152.     Weight = 2,
  153.     Price = 1300,
  154.     Class = "m9k_nerve_gas",
  155.     Model = "models/weapons/w_40mm_grenade_launched.mdl",
  156.     Teams = teamBMD
  157. })
  158.  
  159. AddWeapon({
  160.     Name = "AUG A3",
  161.     Description = "An automatic rifle with a scope.",
  162.     Weight = 18,
  163.     Price = 1400,
  164.     Class = "m9k_auga3",
  165.     Model = "models/weapons/w_auga3.mdl",
  166.     Teams = teamBMD
  167. })
  168.  
  169. AddWeapon({
  170.     Name = "F2000",
  171.     Description = "A semi-automatic sniper rifle.",
  172.     Weight = 22,
  173.     Price = 1800,
  174.     Class = "m9k_f2000",
  175.     Model = "models/weapons/w_fn_f2000.mdl",
  176.     Teams = teamBMD
  177. })
  178.  
  179. AddWeapon({
  180.     Name = "HK 416",
  181.     Description = "An illegal automatic rifle.",
  182.     Weight = 15,
  183.     Price = 1300,
  184.     Class = "m9k_m416",
  185.     Model = "models/weapons/w_hk_416.mdl",
  186.     Teams = teamBMD
  187. })
  188.  
  189. // Pistols
  190.  
  191. AddWeapon({
  192.     Name = "Bizon PP19",
  193.     Description = "The best SMG in CSGO.",
  194.     Weight = 9,
  195.     Price = 950,
  196.     Class = "m9k_bizonp19",
  197.     Model = "models/weapons/w_pp19_bizon.mdl",
  198.     Teams = teamBMD
  199. })
  200.  
  201. AddWeapon({
  202.     Name = "Colt 1911",
  203.     Description = "Possibly the most well known weapon in the world.",
  204.     Weight = 4,
  205.     Price = 500,
  206.     Class = "m9k_colt1911",
  207.     Model = "models/weapons/s_dmgf_co1911.mdl",
  208.     Teams = teamGun
  209. })
  210.  
  211. AddWeapon({
  212.     Name = "HK-USC",
  213.     Description = "A rather powerful SMG that shoots like a rifle!",
  214.     Weight = 5,
  215.     Price = 1300,
  216.     Class = "m9k_usc",
  217.     Model = "models/weapons/w_hk_usc.mdl",
  218.     Teams = teamGun
  219. })
  220.  
  221. AddWeapon({
  222.     Name = "Remington7615P",
  223.     Description = "The cheap hunting rifle that gets the job done.",
  224.     Weight = 5,
  225.     Price = 1400,
  226.     Class = "m9k_remington7615p",
  227.     Model = "models/weapons/w_remington_7615p.mdl",
  228.     Teams = teamGun
  229. })
  230.  
  231. AddWeapon({
  232.     Name = "Desert Eagle",
  233.     Description = "A motherfucking Deagle.",
  234.     Weight = 5,
  235.     Price = 600,
  236.     Class = "m9k_deagle",
  237.     Model = "models/weapons/w_tcom_deagle.mdl",
  238.     Teams = teamGun
  239. })
  240.  
  241. AddWeapon({
  242.     Name = "HK MP5",
  243.     Description = "A rapid firing SMG.",
  244.     Weight = 10,
  245.     Price = 970,
  246.     Class = "m9k_mp5",
  247.     Model = "models/weapons/w_hk_mp5.mdl",
  248.     Teams = teamBMD
  249. })
  250.  
  251. AddWeapon({
  252.     Name = "MP9",
  253.     Description = "A small and silenced SMG.",
  254.     Weight = 7,
  255.     Price = 1100,
  256.     Class = "m9k_mp9",
  257.     Model = "models/weapons/w_brugger_thomet_mp9.mdl",
  258.     Teams= teamBMD
  259. })
  260.  
  261. AddWeapon({
  262.     Name = "Colt Python",
  263.     Description = "A revolver.",
  264.     Weight = 5,
  265.     Price = 600,
  266.     Class = "m9k_coltpython",
  267.     Model = "models/weapons/w_colt_python.mdl",
  268.     Teams = teamGun
  269. })
  270.  
  271. AddWeapon({
  272.     Name = "M92 Beretta",
  273.     Description = "A semi-automatic pistol.",
  274.     Weight = 4,
  275.     Price = 550,
  276.     Class = "m9k_m92beretta",
  277.     Model = "models/weapons/w_beretta_m92.mdl",
  278.     Teams = teamGun
  279. })
  280.  
  281. AddWeapon({
  282.     Name = "HK UMP45",
  283.     Description = "An automatic SMG.",
  284.     Weight = 7,
  285.     Class = "m9k_ump45",
  286.     Price = 800,
  287.     Model = "models/weapons/w_hk_ump45.mdl",
  288.     Teams = teamBMD
  289. })
  290.  
  291. // Heavy
  292.  
  293. AddWeapon({
  294.     Name = "Remington 870",
  295.     Description = "A pump shotgun that uses slugs.",
  296.     Weight = 9,
  297.     Price = 700,
  298.     Class = "m9k_remington870",
  299.     Model = "models/weapons/w_remington_870_tact.mdl",
  300.     Teams = teamGun
  301. })
  302.  
  303. AddWeapon({
  304.     Name = "Benelli M3",
  305.     Description = "A modern pump action shotgun.",
  306.     Weight = 8,
  307.     Price = 750,
  308.     Class = "m9k_m3",
  309.     Model = "models/weapons/w_benelli_m3.mdl",
  310.     Teams = teamGun
  311. })
  312.  
  313. AddWeapon({
  314.     Name = "Double Barrel Shotgun",
  315.     Description = "A shotgun with two barrels.",
  316.     Weight = 9,
  317.     Price = 450,
  318.     Class = "m9k_dbarrel",
  319.     Model = "models/weapons/w_double_barrel_shotgun.mdl",
  320.     Teams = teamGun
  321. })
  322.  
  323. AddWeapon({
  324.     Name = "Winchester 1873",
  325.     Description = "Lever action rifle.",
  326.     Weight = 9,
  327.     Price = 1000,
  328.     Class = "m9k_winchester73",
  329.     Model = "models/weapons/w_winchester_1873.mdl",
  330.     Teams = teamGun
  331. })
  332.  
  333. AddWeapon({
  334.     Name = "SVD Dragunov",
  335.     Description = "A high powered sniper rifle.",
  336.     Weight = 22,
  337.     Price = 1700,
  338.     Class = "m9k_dragunov",
  339.     Model = "models/weapons/w_svd_dragunov.mdl",
  340.     Teams = teamBMD
  341. })
  342.  
  343.  
  344. AddWeapon({
  345.     Name = "Lockpick",
  346.     Description = "A lockpick. It picks locks.",
  347.     Weight = 3,
  348.     Price = 300,
  349.     Class = "lockpick",
  350.     Model = "models/weapons/w_crowbar.mdl",
  351.     Teams = teamBMD
  352. })
  353.  
  354. if (SERVER) then
  355.     resource.AddWorkshop("128089118")
  356.     resource.AddWorkshop("128091208")
  357.     resource.AddWorkshop("128093075")
  358.     resource.AddWorkshop("144982052") -- M9K Specialities
  359. elseif (CLIENT) then
  360.     language.Add("HRP Rifle Ammo_ammo", "Rifle Ammunition")
  361.     language.Add("HRP Shotgun Ammo_ammo", "Shotgun Rounds")
  362.     language.Add("HRP Pistol Ammo_ammo", "Pistol and SMG Ammunition")
  363. end
  364.  
  365. game.AddAmmoType({
  366.     name = "HRP Rifle Ammo",
  367.     dmgtype = DMG_BULLET
  368. })
  369.  
  370. game.AddAmmoType({
  371.     name = "HRP Pistol Ammo",
  372.     dmgtype = DMG_BULLET
  373. })
  374.  
  375. game.AddAmmoType({
  376.     name = "HRP Shotgun Ammo",
  377.     dmgtype = DMG_BUCKSHOT
  378. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement