Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. --[[---------------------------------------------------------------------------
  2. Ammo types
  3. ---------------------------------------------------------------------------
  4. Ammo boxes that can be purchased in the F4 menu.
  5.  
  6. Add your custom ammo types in this file. Here's the syntax:
  7. DarkRP.createAmmoType("ammoType", {
  8. name = "Ammo name",
  9. model = "Model",
  10. price = 1234,
  11. amountGiven = 5678,
  12. customCheck = function(ply) return ply:IsAdmin()
  13. })
  14.  
  15. ammoType: The name of the ammo that Garry's mod recognizes
  16. If you open your SWEP's shared.lua, you can find the ammo name next to
  17. SWEP.Primary.Ammo = "AMMO NAME HERE"
  18. or
  19. SWEP.Secondary.Ammo = "AMMO NAME HERE"
  20.  
  21. name: The name you want to give to the ammo. This can be anything.
  22.  
  23. model: The model you want the ammo to have in the F4 menu
  24.  
  25. price: the price of your ammo in dollars
  26.  
  27. amountGiven: How much bullets of this ammo is given every time the player buys it
  28.  
  29. customCheck: (Optional! Advanced!) a Lua function that describes who can buy the ammo.
  30. Similar to the custom check function for jobs and shipments
  31. Parameters:
  32. ply: the player who is trying to buy the ammo
  33.  
  34. Examples are below!
  35.  
  36. Pistol ammo type. Used by p228, desert eagle and all other pistols
  37. Example 1:
  38.  
  39. DarkRP.createAmmoType("pistol", {
  40. name = "Pistol ammo",
  41. model = "models/Items/BoxSRounds.mdl",
  42. price = 30,
  43. amountGiven = 24
  44. })
  45.  
  46. Buckshot ammo, used by the shotguns
  47. Example 2:
  48.  
  49. DarkRP.createAmmoType("buckshot", {
  50. name = "Shotgun ammo",
  51. model = "models/Items/BoxBuckshot.mdl",
  52. price = 50,
  53. amountGiven = 8
  54. })
  55.  
  56. Rifle ammo, usually used by assault rifles
  57. Example 3:
  58.  
  59. DarkRP.createAmmoType("smg1", {
  60. name = "Rifle ammo",
  61. model = "models/Items/BoxMRounds.mdl",
  62. price = 80,
  63. amountGiven = 30
  64. })
  65.  
  66. Add new ammo types under the next line!
  67. ---------------------------------------------------------------------------]]
  68. DarkRP.createAmmoType("357", {
  69. name = "M9K 357 ammo",
  70. model = "models/Items/357ammobox.mdl",
  71. price = 60,
  72. amountGiven = 20,
  73. category = "Other"
  74. })
  75. DarkRP.createAmmoType("ar2", {
  76. name = "M9K Rifle ammo",
  77. model = "models/Items/BoxMRounds.mdl",
  78. price = 60,
  79. amountGiven = 30,
  80. category = "Other"
  81. })
  82. DarkRP.createAmmoType("buckshot", {
  83. name = "M9K Shotgun ammo",
  84. model = "models/Items/BoxBuckshot.mdl",
  85. price = 40,
  86. amountGiven = 8,
  87. category = "Other"
  88. })
  89. DarkRP.createAmmoType("pistol", {
  90. name = "M9K Pistol ammo",
  91. model = "models/Items/BoxSRounds.mdl",
  92. price = 20,
  93. amountGiven = 20,
  94. category = "Other"
  95. })
  96. DarkRP.createAmmoType("smg1", {
  97. name = "M9K SMG ammo",
  98. model = "models/Items/BoxMRounds.mdl",
  99. price = 40,
  100. amountGiven = 60,
  101. category = "Other"
  102. })
  103. DarkRP.createAmmoType("SniperPenetratedRound", {
  104. name = "M9K Sniper ammo",
  105. model = "models/Items/BoxMRounds.mdl",
  106. price = 80,
  107. amountGiven = 6,
  108. category = "Other"
  109. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement