SHARE
TWEET

Untitled

a guest May 19th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local maxPrinters = 4
  2. local commands = {
  3.     "basicprinter",
  4.     "goldprinter",
  5.     "diamondprinter",
  6.     "emeraldprinter",
  7.     "sapphireprinter",
  8.     "rubyprinter",
  9.     "nuclearprinter",
  10.     // ADD ALL YOUR PRINTERS (DEFINED CHAT COMMANDS OF THEM!)
  11. }
  12. function canGetPrinter(ply)
  13.     local printers = 0
  14.     for i=1, #commands do
  15.         if ply:customEntityLimitReached({cmd = commands[i]}) then
  16.             printers = printers + 1
  17.         end
  18.     end
  19.     if printers >= maxPrinters then return false end
  20.     return true
  21. end
  22.  
  23. DarkRP.createEntity("Basic Printer", {
  24.     ent = "moneyprinter_basic",
  25.     model = "models/props_c17/consolebox01a.mdl",
  26.     price = 25000,
  27.     max = 1,
  28.     cmd = "basicprinter",
  29.     category = "Printers"
  30. })
  31.  
  32. DarkRP.createEntity("Gold Printer", {
  33.     ent = "moneyprinter_gold",
  34.     model = "models/props_c17/consolebox01a.mdl",
  35.     price = 35000,
  36.     max = 1,
  37.     cmd = "goldprinter",
  38.     category = "Printers"
  39. })
  40.  
  41. DarkRP.createEntity("Diamond Printer", {
  42.     ent = "moneyprinter_diamond",
  43.     model = "models/props_c17/consolebox01a.mdl",
  44.     price = 60000,
  45.     max = 1,
  46.     cmd = "diamondprinter",
  47.     category = "Printers"
  48.     customCheck = function(ply) return CLIENT or canGetPrinter(ply) end,
  49.     CustomCheckFailMsg = "You already have 4 printers!",
  50. })
  51.  
  52. DarkRP.createEntity("Emerald Printer", {
  53.     ent = "moneyprinter_emerald",
  54.     model = "models/props_c17/consolebox01a.mdl",
  55.     price = 100000,
  56.     max = 1,
  57.     cmd = "emeraldprinter",
  58.     category = "Printers",
  59.     customCheck = function(ply)
  60.         if CLIENT then return true end
  61.         if !canGetPrinter(ply) then return false end
  62.         if !table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "prime", "elite", "eventmanager", "adminplus", "moderatorplus", "operator", "vip"}, ply:GetNWString("usergroup")) then return false end
  63.         return true
  64.     end,
  65.     CustomCheckFailMsg = function(ply)
  66.         if canGetPrinter(ply) then
  67.             return "This printer is for VIP/Prime/Elite only!"
  68.         else
  69.             return "You already have 4 printers"
  70.         end
  71.     end,
  72. })
  73.  
  74. DarkRP.createEntity("Sapphire Printer", {
  75.     ent = "moneyprinter_sapphire",
  76.     model = "models/props_c17/consolebox01a.mdl",
  77.     price = 175000,
  78.     max = 1,
  79.     cmd = "sapphireprinter",
  80.     category = "Printers",
  81.     customCheck = function(ply) return CLIENT or
  82.         table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "prime", "elite", "eventmanager", "adminplus", "moderatorplus", "operator"}, ply:GetNWString("usergroup"))
  83.     end,
  84.     CustomCheckFailMsg = "This printer is for Prime/Elite only!",
  85. })
  86.  
  87. DarkRP.createEntity("Ruby Printer", {
  88.     ent = "moneyprinter_ruby",
  89.     model = "models/props_c17/consolebox01a.mdl",
  90.     price = 225000,
  91.     max = 1,
  92.     cmd = "rubyprinter",
  93.     category = "Printers",
  94.     customCheck = function(ply) return CLIENT or
  95.         table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "elite", "eventmanager", "adminplus", "moderatorplus", "operator"}, ply:GetNWString("usergroup"))
  96.     end,
  97.     CustomCheckFailMsg = "This printer is for Elite only!",
  98. })
  99.  
  100. DarkRP.createEntity("Nuclear Printer", {
  101.     ent = "moneyprinter_nuclear",
  102.     model = "models/props_c17/consolebox01a.mdl",
  103.     price = 300000,
  104.     max = 1,
  105.     cmd = "nuclearprinter",
  106.     category = "Printers",
  107.     customCheck = function(ply) return CLIENT or
  108.         table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "eventmanager", "adminplus", "moderatorplus", "operator", "prestige"}, ply:GetNWString("usergroup"))
  109.     end,
  110.     CustomCheckFailMsg = "This printer is for Prestige only!",
  111. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top