Guest User

Untitled

a guest
Sep 13th, 2020
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.70 KB | None | 0 0
  1. do
  2.  
  3. FS_INVENTORY = FS_INVENTORY or {}
  4.  
  5. // Enable debug mode
  6. FS_INVENTORY.Debug = true
  7.  
  8. // You can use: mysqloo, sqlite
  9. FS_INVENTORY.DataSaveType = "sqlite"
  10.  
  11. // Enable backpacks ?
  12. FS_INVENTORY.BackpacksSystem = false
  13.  
  14. // superadmin groups
  15. FS_INVENTORY.AdminsGroup = {'superadmin'}
  16.  
  17. // Use workshop DL?
  18. FS_INVENTORY.WorkshopDL = true
  19.  
  20. // Auto-Save inventory interval (in sec.)
  21. FS_INVENTORY.AutoSaveInv = 300
  22.  
  23. // Default inventory size
  24. FS_INVENTORY.DefInvSize = 16
  25.  
  26. // Vehicle inventory size
  27. FS_INVENTORY.VehicleInvSize = 18
  28.  
  29. // Pickup distance
  30. FS_INVENTORY.PickupDistance = 100
  31.  
  32. // Stack size of item
  33. FS_INVENTORY.StackSize = 10
  34.  
  35. // Addon language
  36. FS_INVENTORY.Lang = "en"
  37.  
  38. // Default font
  39. FS_INVENTORY.DefaultFont = "Roboto"
  40.  
  41. // Show backpack model?
  42. FS_INVENTORY.ShowBackpack = true
  43.  
  44. // Drop inventory after death?
  45. FS_INVENTORY.DeathDropItems = true
  46.  
  47. // Custom function for get vehicle owner (if not darkrp gamemode)
  48. FS_INVENTORY.CustomGetVehicleOwner = function(vehicle) return nil end
  49.  
  50. // Custom function for get money amount (if you use DarkRP then don't touch this)
  51. FS_INVENTORY.CustomGetMoneyFunction = function(ply) return 0 end
  52.  
  53. // Custom function for set money amount (if you use DarkRP then don't touch this)
  54. FS_INVENTORY.CustomSetMoneyFunction = function(ply, amount) return 0 end
  55.  
  56. // Backpack seller model NPC
  57. FS_INVENTORY.BackpackSellerNPCMdl = "models/odessa.mdl"
  58.  
  59. // Money prefix
  60. FS_INVENTORY.MoneyPrefix = "$"
  61.  
  62. // Default body human image
  63. FS_INVENTORY.BodyImage = "https://i.imgur.com/Z7zh2A5.png"
  64.  
  65. // Default setting button
  66. FS_INVENTORY.SettingImage = "https://i.imgur.com/3svwvGI.png"
  67.  
  68. // Deny to pickup entities class
  69. FS_INVENTORY.EntBlackListToPickup = {
  70.     "prop_physics",
  71. }
  72.  
  73. // Custom icons (ONLY https://i.imgur.com/ RECOMMENDED!)
  74. -- Sizes:
  75. -- 64x64 (low quality)
  76. -- 128x128 (hight quality)
  77. FS_INVENTORY.CustomIcons = {
  78.     ['item_ammo_357'] = "https://i.imgur.com/JJ567NG.png",
  79.     ['weapon_357'] = "https://i.imgur.com/q1AS4yk.png",
  80. }
  81.  
  82. // Loot boxes
  83. FS_INVENTORY.LootBoxes = {
  84.     ['box_medium'] = { -- Unical box name
  85.         name = "Box 1", -- Any box name
  86.         cooldown = 30, -- Cooldown in sec.
  87.         remove_after_looting = false, -- Remove loot box after looting?
  88.         items = {
  89.             ["item_ammo_357"] = { -- entity class
  90.                 name = "Ammoo 357", -- Entity custom name
  91.                 amount = 10, -- amount of entity
  92.                 chance = 60, -- Chance to find him
  93.                 model = "models/Items/357ammo.mdl" -- Ent model
  94.             },
  95.             ["item_ammo_ar2_altfire"] = {
  96.                 name = "Ammo",
  97.                 amount = 25,
  98.                 chance = 60,
  99.                 model = "models/Items/combine_rifle_ammo01.mdl"
  100.             },
  101.         }
  102.     },
  103.     ['box_hard'] = {
  104.         name = "Box 2",
  105.         cooldown = 10,
  106.         remove_after_looting = true,
  107.         items = {
  108.             ["item_healthkit"] = {
  109.                 name = "Health kit",
  110.                 amount = 1,
  111.                 chance = 50,
  112.                 model = "models/Items/HealthKit.mdl"
  113.             },
  114.             ["item_battery"] = {
  115.                 name = "Armor",
  116.                 amount = 1,
  117.                 chance = 20,
  118.                 model = "models/Items/battery.mdl"
  119.             },
  120.         }
  121.     }  
  122. }
  123.  
  124. --[[-------------------------------------------------------------------------
  125.                         COLORS
  126. ---------------------------------------------------------------------------]]
  127.  
  128. // Main background
  129. FS_INVENTORY.Background = Color(30,30,30)
  130. // Main background white
  131. FS_INVENTORY.BackgroundWhite = Color(50,50,50)
  132.  
  133. // Scrollbar
  134. FS_INVENTORY.ScrollBG = Color(50,50,50)
  135. FS_INVENTORY.ScrollButtons = Color(30,30,30)
  136.  
  137. // Item slot
  138. FS_INVENTORY.SlotBackground = Color(50,50,50)
  139. FS_INVENTORY.SlotBackgroundBorders = Color(20,20,20)
  140.  
  141. // Text
  142. FS_INVENTORY.TextWhite = Color(255,255,255)
  143.  
  144. // Green
  145. FS_INVENTORY.Green = Color(0,150,0)
  146.  
  147. // Yellow
  148. FS_INVENTORY.Yellow = Color(150,150,0)
  149.  
  150. // Red
  151. FS_INVENTORY.Red = Color(150,0,0)
  152.  
  153. --[[-------------------------------------------------------------------------
  154.                             Item Popup Menu
  155. ---------------------------------------------------------------------------]]
  156. --[[
  157. Example:
  158. ['Name'] = { -- Name
  159.     showsingle = false, -- Show if item is single?
  160.     filter = {'food'}, -- Show only for this items category (set filter = {} for all)
  161.     onclick = function(item_id, amount) -- Click function
  162.         print("You click on "..item_id..". Amount: "..amount)
  163.     end
  164. },
  165. ]]
  166. FS_INVENTORY.ItemPopup = {
  167. --[[
  168.     ['Print'] = { -- Name
  169.         showsingle = false, -- Show if item is single?
  170.         filter = {'food'}, -- Show only for this items category (set filter = {} for all)
  171.         onclick = function(item_id, amount) -- Click function
  172.             print("You click on "..item_id..". Amount: "..amount)
  173.         end
  174.     },
  175. ]]
  176. }
  177.  
  178. --[[-------------------------------------------------------------------------
  179.                             In Game Configuration
  180. ---------------------------------------------------------------------------]]
  181.  
  182. FS_INVENTORY.InGameConfigurations = {
  183.     ["Hide custom items icon?"] = {
  184.         adminonly = false, -- Only admin can see this configuration ?
  185.         show = true,
  186.         value = tobool(GetConVarNumber('fs_inventory_hide_default_icons')) or false, -- Default value (REQUIRE!) now it inherited from FS_INVENTORY.ShowBackpack value
  187.         onchange = function(new_value) -- Change value event
  188.             if new_value then
  189.                 RunConsoleCommand("fs_inventory_hide_default_icons", 1)
  190.             else
  191.                 RunConsoleCommand("fs_inventory_hide_default_icons", 0)
  192.             end
  193.         end,
  194.     },
  195.     ["Hide backpacks?"] = {
  196.         adminonly = false, -- Only admin can see this configuration ?
  197.         show = FS_INVENTORY.BackpacksSystem,
  198.         value = tobool(GetConVarNumber('fs_inventory_hide_backpacks')) or false, -- Default value (REQUIRE!) now it inherited from FS_INVENTORY.ShowBackpack value
  199.         onchange = function(new_value) -- Change value event
  200.             if new_value then
  201.                 RunConsoleCommand("fs_inventory_hide_backpacks", 1)
  202.             else
  203.                 RunConsoleCommand("fs_inventory_hide_backpacks", 0)
  204.             end
  205.         end,
  206.     },
  207. }
  208. end
Add Comment
Please, Sign In to add comment