Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.21 KB | None | 0 0
  1. ENT.Base = "base_ai"
  2. ENT.Type = "ai"
  3. ENT.PrintName = "NPC Shop"
  4. ENT.Author = "Crap-Head"
  5.  
  6.  
  7. --[[
  8. Below is the table of items for the NPC shop.
  9. Customize the list below to add new items. Make sure you follow the instructions correctly.
  10.  
  11.  
  12. Example item. Explenation of what each "table" does.
  13. NPCShop_Items["item_glock"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  14. Name = "Glock 18", -- The name of the item.
  15. Description = "Small pistol. Deals alright damage to your enemy.", -- The description of the item. This supports multilines.
  16. Model = "models/weapons/w_pist_glock18.mdl", -- The display model.
  17. Price = 400, -- The price of the item.
  18. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  19. function(ply,item)
  20. ply:Give("weapon_glock2") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  21. end,
  22. }
  23. --]]
  24.  
  25. NPCShop_Items = {}
  26.  
  27.  
  28.  
  29. NPCShop_Items["weapon_vape"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  30. Name = "Normal Vape", -- The name of the item.
  31. Description = "Go green", -- The description of the item. This supports multilines.
  32. Model = "models/swamponions/vape.mdl", -- The display model.
  33. Price = 5000, -- The price of the item.
  34. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  35. function(ply,item)
  36. ply:Give("weapon_vape") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  37. end,
  38. }
  39.  
  40. NPCShop_Items["weapon_vape_golden"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  41. Name = "Golden Vape", -- The name of the item.
  42. Description = "Gold is really worth", -- The description of the item. This supports multilines.
  43. Model = "models/swamponions/vape.mdl", -- The display model.
  44. Price = 5500, -- The price of the item.
  45. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  46. function(ply,item)
  47. ply:Give("weapon_vape_golden") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  48. end,
  49. }
  50.  
  51. NPCShop_Items["weapon_vape_custom"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  52. Name = "Custom Vape", -- The name of the item.
  53. Description = "Costumize your vape", -- The description of the item. This supports multilines.
  54. Model = "models/swamponions/vape.mdl", -- The display model.
  55. Price = 10000, -- The price of the item.
  56. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  57. function(ply,item)
  58. ply:Give("weapon_vape_custom") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  59. end,
  60. }
  61.  
  62. NPCShop_Items["weapon_vape_butterfly"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  63. Name = "Butterfly Vape", -- The name of the item.
  64. Description = "Ninja poweeer", -- The description of the item. This supports multilines.
  65. Model = "models/swamponions/vape.mdl", -- The display model.
  66. Price = 6500, -- The price of the item.
  67. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  68. function(ply,item)
  69. ply:Give("weapon_vape_butterfly") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  70. end,
  71. }
  72.  
  73. NPCShop_Items["weapon_vape_american"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  74. Name = "American Vape", -- The name of the item.
  75. Description = "AMERICAAAAA!!", -- The description of the item. This supports multilines.
  76. Model = "models/swamponions/vape.mdl", -- The display model.
  77. Price = 7500, -- The price of the item.
  78. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  79. function(ply,item)
  80. ply:Give("weapon_vape_american") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  81. end,
  82. }
  83.  
  84. NPCShop_Items["weapon_vape_hallucinogenic"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  85. Name = "Hallucinogenic Vape", -- The name of the item.
  86. Description = "I feel really bad", -- The description of the item. This supports multilines.
  87. Model = "models/swamponions/vape.mdl", -- The display model.
  88. Price = 9000, -- The price of the item.
  89. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  90. function(ply,item)
  91. ply:Give("weapon_vape_hallucinogenic") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  92. end,
  93. }
  94.  
  95. NPCShop_Items["weapon_vape_juicy"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  96. Name = "Juicy Vape", -- The name of the item.
  97. Description = "You need some vitamins", -- The description of the item. This supports multilines.
  98. Model = "models/swamponions/vape.mdl", -- The display model.
  99. Price = 6000, -- The price of the item.
  100. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  101. function(ply,item)
  102. ply:Give("weapon_vape_juicy") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  103. end,
  104. }
  105.  
  106. NPCShop_Items["weapon_vape_medicinal"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  107. Name = "Medicinal Vape", -- The name of the item.
  108. Description = "Make yourself 100% healed person", -- The description of the item. This supports multilines.
  109. Model = "models/swamponions/vape.mdl", -- The display model.
  110. Price = 75000, -- The price of the item.
  111. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  112. function(ply,item)
  113. ply:Give("weapon_vape_medicinal") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  114. end,
  115. function(ply)
  116. if not ply:GetUserGroup() == "Owner" or ply:GetUserGroup() == "Donator" or ply:GetUserGroup() == "superadmin" or ply:GetUserGroup() == "Head Admin" or ply:GetUserGroup() == "admin" or ply:GetUserGroup() == "Community Manager" then
  117. BuyItem:SetDisabled ( true )
  118. BuyItem:SetToolTip("This Vape is only for Donators!")
  119. else
  120. BuyItem:SetDisabled ( false )
  121. end
  122. end,
  123. }
  124.  
  125. NPCShop_Items["weapon_vape_mega"] = { -- This does not display anywhere, but is used by the server, as well as the client to purchase the item. Make sure this is unique on all items.
  126. Name = "Mega Vape", -- The name of the item.
  127. Description = "Big smoke comming out", -- The description of the item. This supports multilines.
  128. Model = "models/swamponions/vape.mdl", -- The display model.
  129. Price = 50000, -- The price of the item.
  130. BuyFunction = -- This is what happens when you purchase the weapon. Having a bit of lua knownledge is a huge bonus here, but you can make items rather simple, even if you don't know anything about lua.
  131. function(ply,item)
  132. ply:Give("weapon_vape_mega") -- This is what you want to edit. This item gives the player (ply), a glock (weapon_glock2, darkrp name of the weapon entity). Other items below gives the player health, or armor. Anything can be done with the items.
  133. end,
  134. function(ply)
  135. if not ply:GetUserGroup() == "Owner" or ply:GetUserGroup() == "Donator" or ply:GetUserGroup() == "superadmin" or ply:GetUserGroup() == "Head Admin" or ply:GetUserGroup() == "admin" or ply:GetUserGroup() == "Community Manager" then
  136. BuyItem:SetDisabled ( true )
  137. BuyItem:SetToolTip("This Vape is only for Donators!")
  138. else
  139. BuyItem:SetDisabled ( false )
  140. end
  141. end,
  142. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement