Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local maxPrinters = 4
- local commands = {
- "basicprinter",
- "goldprinter",
- "diamondprinter",
- "emeraldprinter",
- "sapphireprinter",
- "rubyprinter",
- "nuclearprinter",
- // ADD ALL YOUR PRINTERS (DEFINED CHAT COMMANDS OF THEM!)
- }
- function canGetPrinter(ply)
- local printers = 0
- for i=1, #commands do
- if ply:customEntityLimitReached({cmd = commands[i]}) then
- printers = printers + 1
- end
- end
- if printers >= maxPrinters then return false end
- return true
- end
- DarkRP.createEntity("Basic Printer", {
- ent = "moneyprinter_basic",
- model = "models/props_c17/consolebox01a.mdl",
- price = 25000,
- max = 1,
- cmd = "basicprinter",
- category = "Printers"
- })
- DarkRP.createEntity("Gold Printer", {
- ent = "moneyprinter_gold",
- model = "models/props_c17/consolebox01a.mdl",
- price = 35000,
- max = 1,
- cmd = "goldprinter",
- category = "Printers"
- })
- DarkRP.createEntity("Diamond Printer", {
- ent = "moneyprinter_diamond",
- model = "models/props_c17/consolebox01a.mdl",
- price = 60000,
- max = 1,
- cmd = "diamondprinter",
- category = "Printers"
- customCheck = function(ply) return CLIENT or canGetPrinter(ply) end,
- CustomCheckFailMsg = "You already have 4 printers!",
- })
- DarkRP.createEntity("Emerald Printer", {
- ent = "moneyprinter_emerald",
- model = "models/props_c17/consolebox01a.mdl",
- price = 100000,
- max = 1,
- cmd = "emeraldprinter",
- category = "Printers",
- customCheck = function(ply)
- if CLIENT then return true end
- if !canGetPrinter(ply) then return false end
- 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
- return true
- end,
- CustomCheckFailMsg = function(ply)
- if canGetPrinter(ply) then
- return "This printer is for VIP/Prime/Elite only!"
- else
- return "You already have 4 printers"
- end
- end,
- })
- DarkRP.createEntity("Sapphire Printer", {
- ent = "moneyprinter_sapphire",
- model = "models/props_c17/consolebox01a.mdl",
- price = 175000,
- max = 1,
- cmd = "sapphireprinter",
- category = "Printers",
- customCheck = function(ply) return CLIENT or
- table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "prime", "elite", "eventmanager", "adminplus", "moderatorplus", "operator"}, ply:GetNWString("usergroup"))
- end,
- CustomCheckFailMsg = "This printer is for Prime/Elite only!",
- })
- DarkRP.createEntity("Ruby Printer", {
- ent = "moneyprinter_ruby",
- model = "models/props_c17/consolebox01a.mdl",
- price = 225000,
- max = 1,
- cmd = "rubyprinter",
- category = "Printers",
- customCheck = function(ply) return CLIENT or
- table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "elite", "eventmanager", "adminplus", "moderatorplus", "operator"}, ply:GetNWString("usergroup"))
- end,
- CustomCheckFailMsg = "This printer is for Elite only!",
- })
- DarkRP.createEntity("Nuclear Printer", {
- ent = "moneyprinter_nuclear",
- model = "models/props_c17/consolebox01a.mdl",
- price = 300000,
- max = 1,
- cmd = "nuclearprinter",
- category = "Printers",
- customCheck = function(ply) return CLIENT or
- table.HasValue({"trialmoderator", "moderator", "admin", "headadmin", "headmoderator", "staffmanager", "servermanager", "superadmin", "eventmanager", "adminplus", "moderatorplus", "operator", "prestige"}, ply:GetNWString("usergroup"))
- end,
- CustomCheckFailMsg = "This printer is for Prestige only!",
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement