Dark RP has no entities?

Someone recommended that I repost this in Lua so I am.

I just started up a DarkRP server and there are no entities for any class to spawn. The money printers aren’t there, the guns aren’t there, and gun dealer’s can’t buy weapon shipments or gun labs. Can someone please help me?

Your addentities.lua is edited the wrong way.

Could you help me edit it the proper way? Please?

If you really edited it, it would be a good idea to post it here.
Also, remember [lua] tags.

One sec.

[editline]1st January 2013[/editline]


AddEntity("Drug lab", {
	ent = "drug_lab",
	model = "models/props_lab/crematorcase.mdl",
	price = 400,
	max = 3,
	cmd = "/buydruglab",
	allowed = {TEAM_GANG, TEAM_MOB}
})


AddEntity("Microwave", {
	ent = "microwave",
	model = "models/props/cs_office/microwave.mdl",
	price = 400,
	max = 1,
	cmd = "/buymicrowave",
	allowed = TEAM_COOK
})

AddEntity("Gun lab", {
	ent = "gunlab",
	model = "models/props_c17/TrapPropeller_Engine.mdl",
	price = 500,
	max = 1,
	cmd = "/buygunlab",
	allowed = TEAM_GUN
})


AddEntity("gold_money_printer ", {
	ent = "money_printer",
	model = "models/props_c17/consolebox01a.mdl",
	price = 2500,
	max = 3,
	cmd = "/buymoneyprinter"


})

-- ADD CUSTOM SHIPMENTS HERE(next line):

AddCustomShipment("M249", "models/weapons/w_mach_m249para.mdl", "rcs_m249", 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment("Galil", "models/weapons/w_rif_galil.mdl", "rcs_galil", 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment("AK47", "models/weapons/w_rif_ak47.mdl", "rcs_ak47", 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment("M4A1", "models/weapons/w_rif_m4a1.mdl", "rcs_m4a1", 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment("Famas", "models/weapons/w_rif_famas.mdl", "rcs_famas", 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment("AWP", "models/weapons/w_snip_awp.mdl", "rcs_awp", 15000, 10, true, 1500, false, {TEAM_GUN})
AddCustomShipment("Scout", "models/weapons/w_snip_scout.mdl", "rcs_scout", 12000, 10, true, 1200, false, {TEAM_GUN})
AddCustomShipment("SteyrAug", "models/weapons/w_rif_aug.mdl", "rcs_aug", 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment("SG552", "models/weapons/w_rif_sg552.mdl", "rcs_sg552", 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment("G3SG1", "models/weapons/w_snip_g3sg1.mdl", "rcs_g3sg1", 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment("SG550", "models/weapons/w_snip_sg550.mdl", "rcs_sg550", 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment("UMP45", "models/weapons/w_smg_ump45.mdl", "rcs_ump_45", 8000, 10, true, 800, false, {TEAM_GUN})
AddCustomShipment("P90", "models/weapons/w_smg_p90.mdl", "rcs_p90", 8000, 10, true, 800, false, {TEAM_GUN})
AddCustomShipment("TMP", "models/weapons/w_smg_tmp.mdl", "rcs_tmp", 7000, 10, true, 700, false, {TEAM_GUN})
AddCustomShipment("MP5", "models/weapons/w_smg_mp5.mdl", "rcs_mp5a5", 8000, 10, true, 800, false, {TEAM_GUN})
AddCustomShipment("Mac10", "models/weapons/w_smg_mac10.mdl", "rcs_mac10", 7500, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment("AutoShotgun", "models/weapons/w_shot_xm1014.mdl", "rcs_xm1014", 11000, 10, true, 1100, false, {TEAM_GUN})
AddCustomShipment("M3 Shotgun", "models/weapons/w_shot_m3super90.mdl", "rcs_pumpshotgun", 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment("Deagle", "models/weapons/w_pist_deagle.mdl", "rcs_desert_eagle", 7500, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment("USP", "models/weapons/w_pist_usp.mdl", "rcs_usp", 6000, 10, true, 600, false, {TEAM_GUN})
AddCustomShipment("P228", "models/weapons/w_pist_p228.mdl", "rcs_p228", 5500, 10, true, 550, false, {TEAM_GUN})
AddCustomShipment("Glock", "models/weapons/w_pist_glock18.mdl", "rcs_glock18", 5000, 10, true, 500, false, {TEAM_GUN})
AddCustomShipment("FiveSeven", "models/weapons/w_pist_fiveseven.mdl", "rcs_five-seven", 4500, 10, true, 450, false, {TEAM_GUN})
AddCustomShipment("Knife", "models/weapons/w_knife_t.mdl", "rcs_knife", 2500, 10, true, 250, false, {TEAM_GUN})
})




Lua tags…

Anyway, try this:
[lua]
AddEntity(“Drug lab”, {
ent = “drug_lab”,
model = “models/props_lab/crematorcase.mdl”,
price = 400,
max = 3,
cmd = “/buydruglab”,
allowed = {TEAM_GANG, TEAM_MOB}
})

AddEntity(“Microwave”, {
ent = “microwave”,
model = “models/props/cs_office/microwave.mdl”,
price = 400,
max = 1,
cmd = “/buymicrowave”,
allowed = TEAM_COOK
})

AddEntity(“Gun lab”, {
ent = “gunlab”,
model = “models/props_c17/TrapPropeller_Engine.mdl”,
price = 500,
max = 1,
cmd = “/buygunlab”,
allowed = TEAM_GUN
})

AddEntity("gold_money_printer ", {
ent = “money_printer”,
model = “models/props_c17/consolebox01a.mdl”,
price = 2500,
max = 3,
cmd = “/buymoneyprinter”

})

– ADD CUSTOM SHIPMENTS HERE(next line):

AddCustomShipment(“M249”, “models/weapons/w_mach_m249para.mdl”, “rcs_m249”, 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment(“Galil”, “models/weapons/w_rif_galil.mdl”, “rcs_galil”, 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment(“AK47”, “models/weapons/w_rif_ak47.mdl”, “rcs_ak47”, 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment(“M4A1”, “models/weapons/w_rif_m4a1.mdl”, “rcs_m4a1”, 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment(“Famas”, “models/weapons/w_rif_famas.mdl”, “rcs_famas”, 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment(“AWP”, “models/weapons/w_snip_awp.mdl”, “rcs_awp”, 15000, 10, true, 1500, false, {TEAM_GUN})
AddCustomShipment(“Scout”, “models/weapons/w_snip_scout.mdl”, “rcs_scout”, 12000, 10, true, 1200, false, {TEAM_GUN})
AddCustomShipment(“SteyrAug”, “models/weapons/w_rif_aug.mdl”, “rcs_aug”, 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment(“SG552”, “models/weapons/w_rif_sg552.mdl”, “rcs_sg552”, 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment(“G3SG1”, “models/weapons/w_snip_g3sg1.mdl”, “rcs_g3sg1”, 10000, 10, true, 1000, false, {TEAM_GUN})
AddCustomShipment(“SG550”, “models/weapons/w_snip_sg550.mdl”, “rcs_sg550”, 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment(“UMP45”, “models/weapons/w_smg_ump45.mdl”, “rcs_ump_45”, 8000, 10, true, 800, false, {TEAM_GUN})
AddCustomShipment(“P90”, “models/weapons/w_smg_p90.mdl”, “rcs_p90”, 8000, 10, true, 800, false, {TEAM_GUN})
AddCustomShipment(“TMP”, “models/weapons/w_smg_tmp.mdl”, “rcs_tmp”, 7000, 10, true, 700, false, {TEAM_GUN})
AddCustomShipment(“MP5”, “models/weapons/w_smg_mp5.mdl”, “rcs_mp5a5”, 8000, 10, true, 800, false, {TEAM_GUN})
AddCustomShipment(“Mac10”, “models/weapons/w_smg_mac10.mdl”, “rcs_mac10”, 7500, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment(“AutoShotgun”, “models/weapons/w_shot_xm1014.mdl”, “rcs_xm1014”, 11000, 10, true, 1100, false, {TEAM_GUN})
AddCustomShipment(“M3 Shotgun”, “models/weapons/w_shot_m3super90.mdl”, “rcs_pumpshotgun”, 9000, 10, true, 900, false, {TEAM_GUN})
AddCustomShipment(“Deagle”, “models/weapons/w_pist_deagle.mdl”, “rcs_desert_eagle”, 7500, 10, true, 750, false, {TEAM_GUN})
AddCustomShipment(“USP”, “models/weapons/w_pist_usp.mdl”, “rcs_usp”, 6000, 10, true, 600, false, {TEAM_GUN})
AddCustomShipment(“P228”, “models/weapons/w_pist_p228.mdl”, “rcs_p228”, 5500, 10, true, 550, false, {TEAM_GUN})
AddCustomShipment(“Glock”, “models/weapons/w_pist_glock18.mdl”, “rcs_glock18”, 5000, 10, true, 500, false, {TEAM_GUN})
AddCustomShipment(“FiveSeven”, “models/weapons/w_pist_fiveseven.mdl”, “rcs_five-seven”, 4500, 10, true, 450, false, {TEAM_GUN})
AddCustomShipment(“Knife”, “models/weapons/w_knife_t.mdl”, “rcs_knife”, 2500, 10, true, 250, false, {TEAM_GUN})
[/lua]

Well this works. But there is one problem. It allows everyone to purchase every gun on the server.

Via shipments or just through normal purchasing of weapons?

That’s what everyone can do. Purchase an individual weapon.

Add something like
[lua]allowed = TEAM_[WHATEVERGUNDEALERSARECALLED][/lua]

Under each weapon you want to limit to that certain job.

Well. There are no individual guns in the entities list for me to do that to.

I’m not familiar with DarkRP’s code, but I know they have to initialize those guns somewhere in the code.

make all True’s to False. This will fix it :slight_smile: if you are to lazy…:

[lua]AddEntity(“Drug lab”, {
ent = “drug_lab”,
model = “models/props_lab/crematorcase.mdl”,
price = 400,
max = 3,
cmd = “/buydruglab”,
allowed = {TEAM_GANG, TEAM_MOB}
})

AddEntity(“Microwave”, {
ent = “microwave”,
model = “models/props/cs_office/microwave.mdl”,
price = 400,
max = 1,
cmd = “/buymicrowave”,
allowed = TEAM_COOK
})

AddEntity(“Gun lab”, {
ent = “gunlab”,
model = “models/props_c17/TrapPropeller_Engine.mdl”,
price = 500,
max = 1,
cmd = “/buygunlab”,
allowed = TEAM_GUN
})

AddEntity("gold_money_printer ", {
ent = “money_printer”,
model = “models/props_c17/consolebox01a.mdl”,
price = 2500,
max = 3,
cmd = “/buymoneyprinter”

})

– ADD CUSTOM SHIPMENTS HERE(next line):

AddCustomShipment(“M249”, “models/weapons/w_mach_m249para.mdl”, “rcs_m249”, 10000, 10, false, 1000, false, {TEAM_GUN})
AddCustomShipment(“Galil”, “models/weapons/w_rif_galil.mdl”, “rcs_galil”, 9000, 10, false, 900, false, {TEAM_GUN})
AddCustomShipment(“AK47”, “models/weapons/w_rif_ak47.mdl”, “rcs_ak47”, 10000, 10, false, 1000, false, {TEAM_GUN})
AddCustomShipment(“M4A1”, “models/weapons/w_rif_m4a1.mdl”, “rcs_m4a1”, 10000, 10, false, 1000, false, {TEAM_GUN})
AddCustomShipment(“Famas”, “models/weapons/w_rif_famas.mdl”, “rcs_famas”, 9000, 10, false, 900, false, {TEAM_GUN})
AddCustomShipment(“AWP”, “models/weapons/w_snip_awp.mdl”, “rcs_awp”, 15000, 10, false, 1500, false, {TEAM_GUN})
AddCustomShipment(“Scout”, “models/weapons/w_snip_scout.mdl”, “rcs_scout”, 12000, 10, false, 1200, false, {TEAM_GUN})
AddCustomShipment(“SteyrAug”, “models/weapons/w_rif_aug.mdl”, “rcs_aug”, 9000, 10, false, 900, false, {TEAM_GUN})
AddCustomShipment(“SG552”, “models/weapons/w_rif_sg552.mdl”, “rcs_sg552”, 9000, 10, false, 900, false, {TEAM_GUN})
AddCustomShipment(“G3SG1”, “models/weapons/w_snip_g3sg1.mdl”, “rcs_g3sg1”, 10000, 10, false, 1000, false, {TEAM_GUN})
AddCustomShipment(“SG550”, “models/weapons/w_snip_sg550.mdl”, “rcs_sg550”, 9000, 10, false, 900, false, {TEAM_GUN})
AddCustomShipment(“UMP45”, “models/weapons/w_smg_ump45.mdl”, “rcs_ump_45”, 8000, 10, false, 800, false, {TEAM_GUN})
AddCustomShipment(“P90”, “models/weapons/w_smg_p90.mdl”, “rcs_p90”, 8000, 10, false, 800, false, {TEAM_GUN})
AddCustomShipment(“TMP”, “models/weapons/w_smg_tmp.mdl”, “rcs_tmp”, 7000, 10, false, 700, false, {TEAM_GUN})
AddCustomShipment(“MP5”, “models/weapons/w_smg_mp5.mdl”, “rcs_mp5a5”, 8000, 10, false, 800, false, {TEAM_GUN})
AddCustomShipment(“Mac10”, “models/weapons/w_smg_mac10.mdl”, “rcs_mac10”, 7500, 10, false, 750, false, {TEAM_GUN})
AddCustomShipment(“AutoShotgun”, “models/weapons/w_shot_xm1014.mdl”, “rcs_xm1014”, 11000, 10, false, 1100, false, {TEAM_GUN})
AddCustomShipment(“M3 Shotgun”, “models/weapons/w_shot_m3super90.mdl”, “rcs_pumpshotgun”, 9000, 10, false, 900, false, {TEAM_GUN})
AddCustomShipment(“Deagle”, “models/weapons/w_pist_deagle.mdl”, “rcs_desert_eagle”, 7500, 10, false, 750, false, {TEAM_GUN})
AddCustomShipment(“USP”, “models/weapons/w_pist_usp.mdl”, “rcs_usp”, 6000, 10, false, 600, false, {TEAM_GUN})
AddCustomShipment(“P228”, “models/weapons/w_pist_p228.mdl”, “rcs_p228”, 5500, 10, false, 550, false, {TEAM_GUN})
AddCustomShipment(“Glock”, “models/weapons/w_pist_glock18.mdl”, “rcs_glock18”, 5000, 10, false, 500, false, {TEAM_GUN})
AddCustomShipment(“FiveSeven”, “models/weapons/w_pist_fiveseven.mdl”, “rcs_five-seven”, 4500, 10, false, 450, false, {TEAM_GUN})
AddCustomShipment(“Knife”, “models/weapons/w_knife_t.mdl”, “rcs_knife”, 2500, 10, fals, 250, false, {TEAM_GUN})[/lua]

Thank you so much! You’re a big help! Now how do I disable the need for gun licences? OR how do I make it so everyone can purchase a pistol?

If your an admin, you should be able to press F4 and go to the options tab or something and look for the checkbox that disables that.

Everyone who has posted here is** wrong**, just go to the darkrp/gamemode/config.lua and change these variables
BTW: Since you changed all to false for the buygun separate, now the gun dealer won’t be able to buy the weapons without a shipment.
[lua]
– license - Enable/disable People need a license to be able to pick up guns
GM.Config.license = false[/lua]
and
[lua]-- restrictbuypistol - Enabling this feature makes /buy available only to Gun Dealers.
GM.Config.restrictbuypistol = true[/lua]

There you go!

Well, the thing is I already had those two settings set to that. So there was no change.

And to KillerLUA, why mark my comment dumb and not try and help me? I find that to be unnecessary. I’m just searching for help.