Guest User

m-RobNPC

a guest
May 12th, 2022
1,662
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. Config = {}
  2.  
  3. Config.Utility = {
  4. Framework = "NEW", -- Framework NEW - Qbcore or OLD - Qbcore or ESX
  5. CoreName = "qb-core", -- Core Name or Trigger ESX: esx:getSharedObject
  6. ItemBox = "inventory:client:ItemBox", -- If you are using ESX ignore this
  7. WaitAfterRobbing = true, -- Time to wait after new robbery
  8. WaitSeconds = 60, -- Cooldown to steal again
  9. Distance = 5, -- Distance to the NPC do rob
  10. TimeRob = 5000, -- Progressbar duration during theft
  11. KeyToRob = 38, -- "E"
  12. Rewards = {
  13. Type = "money", -- Available: "money", "blackmoney", "item"
  14. MinMoney = 100, -- Minimum money that can come out (Both normal money and dirty money)
  15. MaxMoney = 500, -- Maximum money that can go out (Both normal money and dirty money)
  16. Item = { -- List of available items can drop on npc's
  17. [1] = "phone",
  18. [2] = "water_bottle",
  19. },
  20. ItemAmount = { -- Amount of the item when rob npc
  21. MinItem = 1,
  22. MaxItem = 2,
  23. }
  24. },
  25. CallCops = {
  26. Enable = true, -- Enable call cops?
  27. PercentageCall = 50, -- % Percentage to call cops
  28. },
  29. ExperienceSystem = { -- Only Works if you are using QBCore
  30. Enable = true, -- If you use ESX put that to false
  31. Level_1 = {
  32. XP = 0, -- Experience required for level 0 ( Don't touch )
  33. Reward = 1, -- x1 Reward
  34. },
  35. Level_2 = {
  36. XP = 125, -- Experience required for level 2
  37. Reward = 2, -- x2 Reward
  38. },
  39. Level_3 = {
  40. XP = 325, -- Experience required for level 3
  41. Reward = 3, -- x3 Reward
  42. },
  43. Level_4 = {
  44. XP = 525, -- Experience required for level 4
  45. Reward = 4, -- x4 Reward
  46. },
  47. Level_5 = {
  48. XP = 725, -- Experience required for level 5
  49. Reward = 5, -- x5 Reward
  50. }
  51. }
  52. }
  53.  
  54. Language = {
  55. RecentlyStolen = "Take it easy on yourself!",
  56. NpcDead = "You're dead, you can't steal.",
  57. NoDistance = "You're a long way from civilian!",
  58. RobNPC = "Stealing the civilian...",
  59. RobAgain = "Now you can steal again!",
  60. }
  61.  
  62.  
  63. function CallCops()
  64. -- Trigger your event
  65. end
  66.  
  67. function progressBar()
  68. -- Here you can change the progressbar to whatever you want.
  69.  
  70. if Config.Utility.Framework == "NEW" or Config.Utility.Framework == "OLD" then
  71. QBCore.Functions.Progressbar("RoubarNPCZINHO", Language.RobNPC, (Config.Utility.TimeRob), false, true)
  72. elseif Config.Utility.Framework == "ESX" then
  73. TriggerEvent("mythic_progbar:client:progress", {
  74. name = "RoubarNPCZINHO",
  75. duration = Config.Utility.TimeRob,
  76. label = Language.RobNPC,
  77. useWhileDead = false,
  78. canCancel = true,
  79. controlDisables = {},
  80. }, function(status)
  81. end)
  82. end
  83. end
  84.  
  85. function notify(msg)
  86. -- Here you can change the notification to whatever you want.
  87.  
  88. if Config.Utility.Framework == "NEW" or Config.Utility.Framework == "OLD" then
  89. QBCore.Functions.Notify(msg)
  90. elseif Config.Utility.Framework == "ESX" then
  91. exports['mythic_notify']:SendAlert('error', msg, 5000)
  92. end
  93. end
Advertisement
Add Comment
Please, Sign In to add comment