Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.36 KB | None | 0 0
  1. [ERROR] addons/npcstorerob/lua/entities/storerob_corenpc/cl_init.lua:19: attempt to index field 'Config' (a nil value)
  2. 1. unknown - addons/npcstorerob/lua/entities/storerob_corenpc/cl_init.lua:19
  3.  
  4. NPCRobSystem.Config = {}
  5.  
  6. -- If you run into any issues and the addon throws errors at you, contact me through a support ticket, or add me on steam.
  7.  
  8. /*
  9. ====================================================
  10. This first section is for the core side of the addon
  11. ====================================================
  12. */
  13.  
  14.  
  15. -- NPC Model
  16. NPCRobSystem.Config.NPCModel = "models/Humans/Group01/male_07.mdl"
  17.  
  18.  
  19. -- NPC Text
  20. NPCRobSystem.Config.NPCText = "General Store"
  21.  
  22.  
  23. -- The ULX groups that have access to the "savestorerob" command
  24. NPCRobSystem.Config.SaveComGroup = {
  25. ["superadmin"] = true,
  26. ["admin"] = true,
  27. }
  28.  
  29.  
  30. -- The prefix in chat for the store actions
  31. NPCRobSystem.Config.StorePrefix = "[NPC Shop]"
  32.  
  33.  
  34. -- The color of the prefix in chat for the store actions
  35. NPCRobSystem.Config.StorePrefixColor = Color( 210, 195, 20 )
  36.  
  37.  
  38. -- The prefix in chat for the robbery actions
  39. NPCRobSystem.Config.RobPrefix = "[NPC Robbing]"
  40.  
  41.  
  42. -- The color of the prefix in chat for the robbery actions
  43. NPCRobSystem.Config.RobPrefixColor = Color( 20, 195, 210 )
  44.  
  45.  
  46. -- The font used throughout the addon
  47. NPCRobSystem.Config.Font = "Calibri"
  48.  
  49.  
  50. /*
  51. ========================================================
  52. This second section is for the robbery side of the addon
  53. ========================================================
  54. */
  55.  
  56.  
  57. -- Should the store be robable?
  58. NPCRobSystem.Config.RobberySystem = true
  59.  
  60.  
  61. -- How much does the NPC get robbed for?
  62. -- Advanced forumlas are accepted, for example:
  63. -- 1000 * #player.GetAll() | This times the amout of players by 1,000
  64. -- However static numbers also work
  65. NPCRobSystem.Config.RobAmount = 30000
  66.  
  67.  
  68. -- The amount of time it takes to rob the NPC
  69. NPCRobSystem.Config.RobTime = 110
  70.  
  71.  
  72. -- The amount of time it takes for the store to be robable again
  73. NPCRobSystem.Config.RobCoodownTime = 300
  74.  
  75.  
  76. -- What % of players need to be Government for the store to be robable? (Must be a decimal, e.g: 0.2 would be 20%)
  77. NPCRobSystem.Config.RobGovernmentAmount = 0.0
  78.  
  79.  
  80. -- How many players are needed on the server for the store to be robable?
  81. NPCRobSystem.Config.RobPlayerAmount = 4
  82.  
  83.  
  84. -- Max distance the robber is allowed away from the NPC while robbing it
  85. NPCRobSystem.Config.RobMaxDistance = 500
  86.  
  87.  
  88. -- How often does the npc call for help? Between 1 and x
  89. NPCRobSystem.Config.RobShouttime = 45
  90.  
  91.  
  92. -- This is the animation that is used while the NPC is being robbed
  93. -- For a list of all the usable ainimations, go to: https://pastebin.com/7Ezumawk
  94. NPCRobSystem.Config.RobActiveAni = "cower_Idle"
  95.  
  96.  
  97. -- Should the NPC play an alarm while being robbed?
  98. NPCRobSystem.Config.RobAlarmActive = true
  99.  
  100.  
  101. -- This is the alarm sound that is used while the NPC is being robbed
  102. -- For a list of all the usable sounds, go to: https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8f77.html
  103. NPCRobSystem.Config.RobAlarmDir = "ambient/alarms/alarm1.wav"
  104.  
  105.  
  106. -- Use the moneybag system? This system drops a money bag instead of giving it straight to the user
  107. NPCRobSystem.Config.RobMoneybagSystem = true
  108.  
  109.  
  110. -- The model of the "money bag" that will drop
  111. NPCRobSystem.Config.RobMoneybagModel = "models/freeman/money_sack.mdl"
  112.  
  113.  
  114. -- Should robberys be restricted to specific jobs?
  115. NPCRobSystem.Config.CanRobSpec = true
  116.  
  117.  
  118. -- What jobs can Rob the NPC?
  119. NPCRobSystem.Config.CanRobJobs = {
  120. TEAM_MOB,
  121. TEAM_GANG,
  122. TEAM_THIEF,
  123. TEAM_DRUG
  124. }
  125.  
  126.  
  127. -- These are the jobs that are considered Government
  128. NPCRobSystem.Config.ConsideredCops = {
  129. TEAM_MAYOR,
  130. TEAM_CHIEF,
  131. TEAM_POLICEDEPT,
  132. TEAM_SECRETSERVICE,
  133. TEAM_POLICE1,
  134. TEAM_POLICE2,
  135. TEAM_POLICE3,
  136. TEAM_POLICE4,
  137. TEAM_POLICE5,
  138. TEAM_POLICE6,
  139. TEAM_POLICE7,
  140. TEAM_POLICE8,
  141. TEAM_POLICE9,
  142. }
  143.  
  144.  
  145. /*
  146. ====================================================
  147. This third section is for the shop part of the addon
  148. ====================================================
  149. */
  150.  
  151.  
  152. -- The color of the buy button IF the player can afford it
  153. NPCRobSystem.Config.ShopBuyColor = Color(0,100,100)
  154.  
  155.  
  156. -- The color of the buy button IF the player cannot afford it
  157. NPCRobSystem.Config.ShopBuyDenyColor = Color(200, 60, 60)
  158.  
  159.  
  160. -- Should the store UI slide onto the screen?
  161. NPCRobSystem.Config.AnimateUISlide = true
  162.  
  163.  
  164. -- Should the store UI stay on screen once an item is purchased?
  165. NPCRobSystem.Config.KeepUIOpen = false
  166.  
  167.  
  168. -- Should the models rotate?
  169. NPCRobSystem.Config.ShopModelRotate = true
  170.  
  171.  
  172. -- These are the tabs that are used in the below table
  173. NPCRobSystem.Config.ShopTabs = {
  174. [1] = { display = "Weapons", tabcolor = Color(140,100,0) },
  175. [2] = { display = "VIP", tabcolor = Color(200,183,0) }
  176. }
  177.  
  178.  
  179. -- name, this is the display name for the item
  180. -- desc, this is the short description for the item
  181. -- ent, this is the actual entity that will be spawned
  182. -- price, this is the price for the item
  183. -- model, this is the display model for the item
  184. -- tabs, this is the tab the item will be under, use the tabs you defined above!
  185. -- isWep, is the item a weapon? By having this true, it will give the item to the players weapon slots. If false, it will spawn on the ground
  186. -- customFunction, is the item restriction system. Use this like you do DarkRP jobs
  187.  
  188. NPCRobSystem.Config.ShopContent = {
  189. [1] = { name = "AK-74", desc = "Blow them all away", ent = "cw_ak74", price = 4000, model = "models/weapons/w_rif_ak47.mdl", tab = "Weapons", isWep = true },
  190. [2] = { name = "AR-15", desc = "Best gun ever", ent = "cw_ar15", price = 6000, model = "models/weapons/w_rif_m4a1.mdl", tab = "Weapons", isWep = true },
  191. [3] = { name = "PM", desc = "Pistol", ent = "cw_makarov", price = 3000, model = "models/cw2/pistols/w_makarov.mdl", tab = "Weapons", isWep = true },
  192. [4] = { name = "P99", desc = "Best Pistol on the market", ent = "cw_p99", price = 5000, model = "models/cw2/pistols/p99.mdl", tab = "Weapons", isWep = true },
  193. [5] = { name = "FN SCAR-H", desc = "Protect your Home", ent = "cw_scarh", price = 6000, model
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement