DarkRp Custom Entity Not working

My DarkRp Custom Entity Is not working it was working but it runs an old entities.lua


DarkRP.createEntity("Power Booster", {
	ent = "wd_power_booster",
	model = "models/props_lab/servers.mdl",
	price = 5000,
	max = 1,
	cmd = "powerboost",
	allowed = {TEAM_HACKER}
})

DarkRP.createEntity("Signal Booster", {
	ent = "wd_signal_amplifier",
	model = "models/props_lab/securitybank.mdl",
	price = 5000,
	max = 1,
	cmd = "signalbooster",
	allowed = {TEAM_HACKER}
})



DarkRP.createShipment("Gas", {
	model = "models/props_junk/gascan001a.mdl",
	entity = "weapon_scarrefuel",
	price = 2000,
	amount = 5,
	seperate = false,
	pricesep = nil,
	noship = false,
	allowed = {TEAM_GASPU}
})

DarkRP.createShipment("Wrench", {
	model = "models/props_c17/tools_wrench01a.mdl",
	entity = "weapon_scarrepair",
	price = 2000,
	amount = 5,
	seperate = false,
	pricesep = nil,
	noship = false,
	allowed = {TEAM_CARREPAIRMEN}
})


DarkRP.createShipment("Watch Dogs Phone Bomb", {
	model = "models/props_c17/SuitCase_Passenger_Physics.mdl",
	entity = "wd_explosive",
	price = 2500,
	amount = 10,
	seperate = false,
	pricesep = nil,
	noship = false,
	allowed = {TEAM_GUN}
})




DarkRP.createEntity("KFC Bucket", {
	ent = "mcdfries",
	model = "models/kfc/kfc.mdl",
	price = 580,
	max = 20,
	cmd = "kfcmeal",
	allowed = {TEAM_KFCM, TEAM_KFCE}
})


DarkRP.createShipment("Shotgun", {
	model = "models/weapons/w_shot_m3super90.mdl",
	entity = "swb_m3super90",
	price = 10000,
	amount = 10,
    seperate = false,
	pricesep = 6000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("XM1014", {
	model = "models/weapons/w_shot_xm1014.mdl",
	entity = "swb_xm1014",
	price = 12000,
	amount = 10,
    seperate = false,
	pricesep = 6000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("357", {
	model = "models/weapons/w_357.mdl",
	entity = "swb_357",d
	price = 6550,
	amount = 10,
    seperate = false,
	pricesep = 6000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("AK-47", {
	model = "models/weapons/w_rif_ak47.mdl",
	entity = "swb_ak47",
	price = 13000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})


DarkRP.createShipment("SMG", {
	model = "models/weapons/w_smg1.mdl",
	entity = "swb_smg",
	price = 10000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("AR2", {
	model = "models/weapons/w_irifle.mdl",
	entity = "swb_ar2",
	price = 11000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("HL2 Pistol", {
	model = "models/weapons/w_pistol.mdl",
	entity = "swb_pistol",
	price = 2550,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("AWP", {
	model = "models/weapons/w_snip_awp.mdl",
	entity = "swb_awp",
	price = 18000,
	amount = 8,
    seperate = false,
	pricesep = 10000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Knife", {
	model = "models/weapons/w_knife_ct.mdl",
	entity = "swb_knife",
	price = 6000,
	amount = 10,
    seperate = true,
	pricesep = 1000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Usp", {
	model = "models/weapons/w_pist_usp_silencer.mdl",
	entity = "swb_usp",
	price = 8000,
	amount = 10,
    seperate = false,
	pricesep = 4000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Deagle", {
	model = "models/weapons/w_pist_deagle.mdl",
	entity = "swb_deagle",
	price = 2500,
	amount = 10,
    seperate = false,
	pricesep = 0,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Five-Seven", {
	model = "models/weapons/w_pist_fiveseven.mdl",
	entity = "swb_fiveseven",
	price = 7500,
	amount = 10,
    seperate = true,
	pricesep = 800,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Sg552", {
	model = "models/weapons/w_rif_sg552.mdl",
	entity = "swb_sg552",
	price = 15000,
	amount = 10,
    seperate = true,
	pricesep = 10000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("UMP", {
	model = "models/weapons/w_smg_ump45.mdl",
	entity = "swb_ump",
	price = 10000,
	amount = 10,
    seperate = false,
	pricesep = 8000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("M4a1", {
	model = "models/weapons/w_rif_m4a1.mdl",
	entity = "swb_m4a1",
	price = 13000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})


DarkRP.createShipment("Mac 10", {
	model = "models/weapons/w_smg_mac10.mdl",
	entity = "swb_mac10",
	price = 8000,
	amount = 10,
    seperate = false,
	pricesep = 3000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("TMP", {
	model = "models/weapons/w_smg_tmp.mdl",
	entity = "swb_tmp",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 5000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("M249", {
	model = "models/weapons/w_mach_m249para.mdl",
	entity = "swb_m249",
	price = 13000,
	amount = 8,
    seperate = false,
	pricesep = 10000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Galil", {
	model = "models/weapons/w_rif_galil.mdl",
	entity = "swb_galil",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 7000,
	noship = false,
	allowed = {TEAM_GUN}
})


DarkRP.createShipment("Scout", {
	model = "models/weapons/w_snip_scout.mdl",
	entity = "swb_scout",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 8000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("P90", {
	model = "models/weapons/w_smg_p90.mdl",
	entity = "swb_p90",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 8000,
	noship = false,
	allowed = {TEAM_GUN}
})

Do you mean your custom entity lua file isn’t working or just one of the entities that are on the list?

my custom entity lua file isnt working and the old one i put a while ago is there

are you using the darkrp-modification addon?

yes i am

ok, so you should only have 2 custom entity lua files. One in garrysmodserver\garrysmod\gamemodes\darkrp\gamemode\config\addentities.lua that you should NEVER touch and one in garrysmodserver\garrysmod\addons\darkrpmodification-master\lua\darkrp_customthings\entities.lua that you use to add your custom entities.

Make sure your custom one is in garrysmodserver\garrysmod\addons\darkrpmodification-master\lua\darkrp_customthings\ and its name is entities.lua

it is named that and theres no other dir that has entities.lua

Is there any lua errors in the console regarding custom entities when you start the server?

[editline]30th August 2014[/editline]

Also, from what it looks like, you are putting the shipments in the entities lua file.
These should go in the entities.lua file


DarkRP.createEntity("Power Booster", {
	ent = "wd_power_booster",
	model = "models/props_lab/servers.mdl",
	price = 5000,
	max = 1,
	cmd = "powerboost",
	allowed = {TEAM_HACKER}
})

DarkRP.createEntity("Signal Booster", {
	ent = "wd_signal_amplifier",
	model = "models/props_lab/securitybank.mdl",
	price = 5000,
	max = 1,
	cmd = "signalbooster",
	allowed = {TEAM_HACKER}
})

and these should go into shipments.lua file
otherwise none of the guns will show up in the weapons tab


DarkRP.createShipment("Gas", {
	model = "models/props_junk/gascan001a.mdl",
	entity = "weapon_scarrefuel",
	price = 2000,
	amount = 5,
	seperate = false,
	pricesep = nil,
	noship = false,
	allowed = {TEAM_GASPU}
})

DarkRP.createShipment("Wrench", {
	model = "models/props_c17/tools_wrench01a.mdl",
	entity = "weapon_scarrepair",
	price = 2000,
	amount = 5,
	seperate = false,
	pricesep = nil,
	noship = false,
	allowed = {TEAM_CARREPAIRMEN}
})


DarkRP.createShipment("Watch Dogs Phone Bomb", {
	model = "models/props_c17/SuitCase_Passenger_Physics.mdl",
	entity = "wd_explosive",
	price = 2500,
	amount = 10,
	seperate = false,
	pricesep = nil,
	noship = false,
	allowed = {TEAM_GUN}
})




DarkRP.createEntity("KFC Bucket", {
	ent = "mcdfries",
	model = "models/kfc/kfc.mdl",
	price = 580,
	max = 20,
	cmd = "kfcmeal",
	allowed = {TEAM_KFCM, TEAM_KFCE}
})


DarkRP.createShipment("Shotgun", {
	model = "models/weapons/w_shot_m3super90.mdl",
	entity = "swb_m3super90",
	price = 10000,
	amount = 10,
    seperate = false,
	pricesep = 6000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("XM1014", {
	model = "models/weapons/w_shot_xm1014.mdl",
	entity = "swb_xm1014",
	price = 12000,
	amount = 10,
    seperate = false,
	pricesep = 6000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("357", {
	model = "models/weapons/w_357.mdl",
	entity = "swb_357",d
	price = 6550,
	amount = 10,
    seperate = false,
	pricesep = 6000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("AK-47", {
	model = "models/weapons/w_rif_ak47.mdl",
	entity = "swb_ak47",
	price = 13000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})


DarkRP.createShipment("SMG", {
	model = "models/weapons/w_smg1.mdl",
	entity = "swb_smg",
	price = 10000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("AR2", {
	model = "models/weapons/w_irifle.mdl",
	entity = "swb_ar2",
	price = 11000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("HL2 Pistol", {
	model = "models/weapons/w_pistol.mdl",
	entity = "swb_pistol",
	price = 2550,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("AWP", {
	model = "models/weapons/w_snip_awp.mdl",
	entity = "swb_awp",
	price = 18000,
	amount = 8,
    seperate = false,
	pricesep = 10000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Knife", {
	model = "models/weapons/w_knife_ct.mdl",
	entity = "swb_knife",
	price = 6000,
	amount = 10,
    seperate = true,
	pricesep = 1000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Usp", {
	model = "models/weapons/w_pist_usp_silencer.mdl",
	entity = "swb_usp",
	price = 8000,
	amount = 10,
    seperate = false,
	pricesep = 4000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Deagle", {
	model = "models/weapons/w_pist_deagle.mdl",
	entity = "swb_deagle",
	price = 2500,
	amount = 10,
    seperate = false,
	pricesep = 0,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Five-Seven", {
	model = "models/weapons/w_pist_fiveseven.mdl",
	entity = "swb_fiveseven",
	price = 7500,
	amount = 10,
    seperate = true,
	pricesep = 800,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Sg552", {
	model = "models/weapons/w_rif_sg552.mdl",
	entity = "swb_sg552",
	price = 15000,
	amount = 10,
    seperate = true,
	pricesep = 10000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("UMP", {
	model = "models/weapons/w_smg_ump45.mdl",
	entity = "swb_ump",
	price = 10000,
	amount = 10,
    seperate = false,
	pricesep = 8000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("M4a1", {
	model = "models/weapons/w_rif_m4a1.mdl",
	entity = "swb_m4a1",
	price = 13000,
	amount = 10,
    seperate = false,
	pricesep = 9000,
	noship = false,
	allowed = {TEAM_GUN}
})


DarkRP.createShipment("Mac 10", {
	model = "models/weapons/w_smg_mac10.mdl",
	entity = "swb_mac10",
	price = 8000,
	amount = 10,
    seperate = false,
	pricesep = 3000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("TMP", {
	model = "models/weapons/w_smg_tmp.mdl",
	entity = "swb_tmp",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 5000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("M249", {
	model = "models/weapons/w_mach_m249para.mdl",
	entity = "swb_m249",
	price = 13000,
	amount = 8,
    seperate = false,
	pricesep = 10000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("Galil", {
	model = "models/weapons/w_rif_galil.mdl",
	entity = "swb_galil",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 7000,
	noship = false,
	allowed = {TEAM_GUN}
})


DarkRP.createShipment("Scout", {
	model = "models/weapons/w_snip_scout.mdl",
	entity = "swb_scout",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 8000,
	noship = false,
	allowed = {TEAM_GUN}
})

DarkRP.createShipment("P90", {
	model = "models/weapons/w_smg_p90.mdl",
	entity = "swb_p90",
	price = 9000,
	amount = 10,
    seperate = false,
	pricesep = 8000,
	noship = false,
	allowed = {TEAM_GUN}
})

theres no shipments and theres only one misc

How come in the code you posted above, it shows that you are trying to create shipments and entities in the same file? The first two items say they are entities, the rest are shipments.

if you are adding shipments, they have to go into the shipments.lua file.
You can’t add the shipments and entities in the same file.

they worked when i put them in there before i never knew you had to but in there because it worked in there and also it used an old entities.lua file and checked the whole gmod folder theres no entites.lua file but in the customthings

Bump

Just fix up organizing entities.lua and shipments.lua, and look for lua errors in your console. Then get back to this thread


[ERROR] addons/darkrptow/lua/weapons/tow_attach/shared.lua:126: 'end' expected (to close 'if' at line 115) near '<eof>'
  1. unknown - addons/darkrptow/lua/weapons/tow_attach/shared.lua:0


Thats all the errors i see in the console

bump