DarkRP restricting printers to one class.

Hey, I’ve started a server where I only want my banker class to be able to spawn printers.

DarkRP.createEntity("Money printer", {
	ent = "money_printer",
	model = "models/props_c17/consolebox01a.mdl",
	price = 1000,
	max = 20,
	cmd = "buymoneyprinter"
        allow = TEAM_BANK

Right now i am getting an error with this line of code.

allow = TEAM_BANK

Here is the lua error.

[ERROR] gamemodes/darkrp/gamemode/config/addentities.lua:126: '}' expected (to close '{' at line 120) near 'allow'
  1. unknown - gamemodes/darkrp/gamemode/config/addentities.lua:0

Thanks for the help in advanced.

DarkRP.createEntity(“Money printer”, {
ent = “money_printer”,
model = “models/props_c17/consolebox01a.mdl”,
price = 1000,
max = 20,
cmd = “buymoneyprinter”,
allow = TEAM_BANK


This is what I already have and it does not work. When I select my banker class, or any other class, I cannot click on the tab that has printers in it. The only way I can get them working again is to delete “allow = TEAM_BANK”

There was a comma missing, try the one I posted. if you have already then I don’t know.

LOL you are amazing.

Commas are everything.

Hmm, now all classes can spawn printers. Is there another location that restricts classes from spawning items from the miscellaneous tab?

[editline]22nd May 2014[/editline]

allowed = TEAM_BANK

Nevermind! Solved that one on my own lol.

Good job, Trust me… you’ll never get used to it :3