· 7 years ago · Nov 20, 2018, 12:02 AM
1elegant_printers.config = {
2 --[[
3 These are the default values that will be used for each printer.
4]]
5 --[[
6 DarkRP custom entity values
7
8 You can also use the other values! https://wiki.darkrp.com/index.php/DarkRP:CustomEntityFields
9 as well as whatever custom fields your addons make use of.
10]]
11 -- example:
12 -- customCheck = function(ply) end,
13 -- This will get run just like if you added the "spawn" field in DarkRP.createEntity!
14 PrintName = "Default Money Printer",
15 -- The name of the money printer that will be displayed in messages and the F4 menu
16 price = 1000,
17 -- The price of a default printer.
18 max = 3,
19 -- By default, you can have any number of printers you want at once. (math.huge = BASICALLY INFINITE)
20 -- If you set this to a number, you will be limited in the amount of printers you can simultaneously own!
21 SeizeReward = 0,
22 -- The amount of money a cop will receive upon seizing a printer. (When attacked with a Stun Stick)
23 --[[
24 The printer entity's values
25]]
26 PrintAmount = 1000,
27 -- The amount of money printed per "ink usage".
28 PrintTime = 60 * 3,
29 -- The amount of time in seconds it takes to print money. ((60 * 3) seconds = 3 minutes)
30 HeatupTime = 10,
31 -- The amount of time in seconds it takes the printer to heat up.
32 -- Everytime the printer heats up, it will take one damage to durability. Once it reaches 0, it will explode!
33 -- You can prevent this using High Quality Cooling.
34 MaxMoney = 10000,
35 -- The maximum amount of money the money printer can store until it stops printing.
36 -- TIP: You can pass math.huge as a value to make it infinite.
37 InkSystem = true,
38 -- If set to false, the printers will work without ink.
39 CoolingSystem = true,
40 -- If set to false, the simple cooling system will be disabled.
41 MaxInk = 5,
42 -- The default amount of times a printer can print money before you have to refill it.
43 InkRefill = 5,
44 -- The amount of ink that will be refilled on usage of an ink cartridge.
45 -- TIP: This value is also used to determine how many slots will be added on usage of an ink cartridge slot upgrade!
46 UpgradedMaxInk = 15,
47 -- The maximum amount of ink a printer can store, with all slot upgrades.
48 LogoURL = "https://image.ibb.co/mEGH0L/NextRP.png",
49 -- An URL linking to the image that will get displayed on your printer's interface.
50 -- Must be a direct link to the image, ending with .jpg or .png
51 GradientDirection = "right",
52 -- The direction of the background gradient used on the printer.
53 -- Possible values: "up", "down", "left", "right", "none"
54 Gradient1 = Color(66, 89, 255),
55 -- Start color of the gradient (Pick RGB values using https://www.w3schools.com/colors/colors_picker.asp)
56 -- If GradientDirection is set to "none", this will be the background of the printer's interface.
57 Gradient2 = Color(20, 184, 255),
58 -- End color of the gradient
59 -- Unused if GradientDirection is set to "none".
60 InvertColors = false,
61 -- Do you want to switch white text for black text, on the printer interface?
62 -- Could improve readability depending on the gradient colors you chose.
63 AllowedVIPs = {},
64 -- "vip",
65 -- If this table exists and is not empty, players that do not have one of the specified usergroups will not be able to buy a printer.
66 --[[
67 If ItemStore is installed...
68
69 https://www.gmodstore.com/scripts/view/15/itemstore-inventory-for-darkrp
70]]
71 ItemStore = true,
72 -- If set to true, this will let you pick up the printers and its upgrades with it.
73 --[[
74 If Vrondrakis's Level System is installed...
75
76 https://github.com/vrondakis/Leveling-System
77]]
78 VrondakisLevelSystem = true,
79 -- If set to true, printers will give XP on money retrieval.
80 VrondakisLevelSystem_Multiplier = 0.25,
81 -- The XP being given is the amount of money being retrieved multiplied by the above number.
82 VrondakisLevelSystem_MinLevel = 0,
83 -- The minimum level required to spawn a printer.
84 --[[
85 Using the same variable names as the ones above with different values, you can create customized printer tiers.
86 The values you pick for them will override the ones of the default printer, set above this comment.
87 You can add any number of tiers you want.
88 Tier names will show up in some places, make sure to capitalize them properly!
89
90 Keep in mind, ALL of the above values have an effect! Don't be afraid to try and mix every config option with another!
91]]
92 Tiers = {
93 Tin = {
94 PrintName = "Tin Money Printer",
95 price = 7000,
96 cmd = "buyprinter_tin",
97 PrintAmount = 900,
98 Gradient1 = Color(230, 230, 230),
99 Gradient2 = Color(235, 235, 235),
100 PrintTime = 60
101 },
102 Copper = {
103 PrintName = "Copper Money Printer",
104 price = 12000,
105 cmd = "buyprinter_copper",
106 PrintAmount = 1000,
107 Gradient1 = Color(115, 81, 42),
108 Gradient2 = Color(115, 81, 42),
109 PrintTime = 75
110 },
111 Titanium = {
112 PrintName = "Titanium Money Printer",
113 price = 18000,
114 cmd = "buyprinter_titanium",
115 PrintAmount = 1200,
116 Gradient1 = Color(63, 63, 63),
117 Gradient2 = Color(63, 63, 63),
118 PrintTime = 75
119 },
120 Bronze = {
121 customCheck = function(ply) return CLIENT or table.HasValue({"superadmin", "developer", "plat_headofstaff", "gold_headofstaff", "plat_headadmin", "gold_headadmin", "plat_admin", "gold_admin", "plat_smod", "gold_smod", "plat_mod", "gold_mod", "plat_trialmod", "gold_trialmod", "platinum", "gold", "silver", "bronze", "silver_headofstaff", "silver_headadmin", "silver_admin", "silver_smod", "silver_mod", "silver_trialmod", "bronze_headofstaff", "bronze_headadmin", "bronze_admin", "bronze_smod", "bronze_mod", "bronze_trialmod"}, ply:GetNWString("usergroup")) end,
122 CustomCheckFailMsg = "This printer is BronzeVIP+ only!",
123 PrintName = "BronzeVIP Money Printer",
124 price = 25000,
125 cmd = "buyprinter_bronze",
126 PrintAmount = 2500,
127 Gradient1 = Color(66, 89, 255),
128 Gradient2 = Color(20, 184, 255),
129 PrintTime = 40
130 },
131 Silver = {
132 customCheck = function(ply) return CLIENT or table.HasValue({"superadmin", "developer", "plat_headofstaff", "gold_headofstaff", "plat_headadmin", "gold_headadmin", "plat_admin", "gold_admin", "plat_smod", "gold_smod", "plat_mod", "gold_mod", "plat_trialmod", "gold_trialmod", "platinum", "gold", "silver", "silver_headofstaff", "silver_headadmin", "silver_admin", "silver_smod", "silver_mod", "silver_trialmod"}, ply:GetNWString("usergroup")) end,
133 CustomCheckFailMsg = "This printer is SilverVIP+ only!",
134 PrintName = "SilverVIP Money Printer",
135 price = 20000,
136 cmd = "buyprinter_silver",
137 PrintAmount = 5500,
138 Gradient1 = Color(160, 160, 160),
139 Gradient2 = Color(150, 150, 150),
140 PrintTime = 35
141 },
142 Gold = {
143 customCheck = function(ply) return CLIENT or table.HasValue({"superadmin", "developer", "plat_headofstaff", "gold_headofstaff", "plat_headadmin", "gold_headadmin", "plat_admin", "gold_admin", "plat_smod", "gold_smod", "plat_mod", "gold_mod", "plat_trialmod", "gold_trialmod", "platinum", "gold"}, ply:GetNWString("usergroup")) end,
144 CustomCheckFailMsg = "This printer is GoldVIP+ only!",
145 PrintName = "GoldVIP Money Printer",
146 price = 19000,
147 cmd = "buyprinter_gold",
148 PrintAmount = 6500,
149 Gradient1 = Color(188, 166, 22),
150 Gradient2 = Color(245, 215, 24),
151 PrintTime = 30
152 },
153 Platinum = {
154 --[[
155 These tables allow you to customize each upgrade's price and model.
156 You shouldn't have to modify the latter at any point, but it's up to you if you want to.
157]]
158 -- If set to true, the item won't show up in the F4 menu.
159 -- If set to true, the item won't show up in the F4 menu.
160 -- If set to true, the item won't show up in the F4 menu.
161 -- If set to true, the item won't show up in the F4 menu.
162 --[[
163 Printing bonus event, triggered with the `elegant_printers_triggerevent` command.
164 You can let superadmins run that command whenever they want, or make it part of a package of your favorite donation system!
165]]
166 customCheck = function(ply)
167 return CLIENT or table.HasValue({
168 "superadmin",
169 "developer",
170 "plat_headofstaff",
171 "plat_headadmin",
172 "plat_admin",
173 "plat_smod, ",
174 plat_mod", ",
175 plat_trialmod", ",
176 platinum"}, ply:GetNWString(",
177 usergroup"))",
178 CustomCheckFailMsg = "This printer is PlatinumVIP only!",
179 PrintName = "PlatinumVIP Money Printer",
180 price = 18000,
181 cmd = "buyprinter_platinum",
182 PrintAmount = 8000,
183 InkSystem = false,
184 CoolingSystem = false,
185 InvertColors = true,
186 Gradient1 = Color(0, 0, 0),
187 Gradient2 = Color(255, 255, 255),
188 PrintTime = 25
189 }, nil, InkCartridge){
190 PrintName = "Money Printer Ink Cartridge",
191 price = 1000,
192 model = "models/freeman/compact_printer_ink.mdl",
193 cmd = "buyprinterink",
194 Disabled = false
195 }, InkSlot{
196 PrintName = "Money Printer Ink Cartridge Slot",
197 price = 1000,
198 model = "models/Items/car_battery01.mdl",
199 cmd = "buyprinterslot",
200 Disabled = false
201 }, RepairPart{
202 PrintName = "Money Printer Repair Part",
203 price = 5000,
204 model = "models/props_lab/reciever01d.mdl",
205 cmd = "buyprinterrepair",
206 Disabled = false
207 }, HQCooling{
208 PrintName = "Money Printer High Quality Cooling",
209 price = 5000,
210 model = "models/props_phx/gears/spur12.mdl",
211 cmd = "buyprintercooling",
212 Disabled = false
213 }, EventDuration
214 end * 60 * 3,
215 -- Duration in seconds ((60 * 60 * 3) seconds = 3 hours)
216 EventPrintMultiplier = 1.5,
217 -- 1.5 equals to +50% print bonus!
218 --[[
219 Usergroup overrides and bonuses
220]]
221 PrintMultiplierVIPs = {}, -- You can make it so certain usergroups benefit from a permanent print percentage bonus, the same way as the event print multiplier.
222 -- superadmin = 1.5,
223 UpgradedMaxInkVIPs = {
224 superadmin = 20
225 },
226 -- Same goes with maximum ink cartridge slot upgrade limits!
227 --[[
228 Miscellaneous values, used for printing in the chat as well as the console, and the F4 menu category.
229]]
230 CommunityName = "NextRP",
231 CommunityColor = Color(245, 245, 245)
232 }
233 }
234}
235--[[
236 Past this point, I strongly advise you not to modify or remove anything else in the addon; unless you know what you are doing.
237 I have made it so the addition of the printers and their upgrades to the F4 menu are completely automated, entirely through
238 the use of the above config table. If you ended up breaking this file, just start over and try again!
239
240 Make sure to restart everytime you make a change to be sure everything has been applied properly.
241 ALSO, DON'T FORGET ANY COMMAS.
242
243 If you have encountered any bug, and are absolutely certain that it is not your fault, please create a support ticket.
244]]