DarkRP setting up drugsmod, help needed

So not long ago I decided to add in drugsmod and it was going fine until I got ingame, and tried selecting the water, when I clicked to spawn it in the F4 menu under entities/weapons, I got this error:


[gamemodes\darkrp\gamemode\main.lua:1163] attempt to index field 'dt' (a nil value)(Hook: PlayerSay)
[cpp] Error: hook->PlayerSay returned a non-string!

This is how I did the addentities.lua


AddEntity("Water", "water", "addons/DurgzMod/models/drug_mod/the_bottle_of_water.mdl", 5, 1, "/buywater")

If I have to go into main.lua I’ll need help.

I got the latest SVN, but there’s no “dt” on that line at all, try update darkrp and see if it works

I got the SVN itself and updated it a couple days ago.

I did this a few years ago, I forget how.

I think there’s a thread that can help you, i’ll search for it.

Edit:

Here it is http://www.facepunch.com/threads/946413

Best of luck with your roleplay.

So it has to be customshipment and not entity? Also just incase if the water code doesn’t help I get an error for Shrooms:


AddEntity("Shroom", "shroom", "addons/DurgzMod/models/ipha/mushroom_small.mdl", 50, 1, "/buyshroom", TEAM_DRUG)


[gamemodes\darkrp\gamemode\main.lua:1163] attempt to index field 'dt' (a nil value)(Hook: PlayerSay)
[cpp] Error: hook->PlayerSay returned a non-string!

Ultimate7Mk, sorry for removing you from friends, caught me when I was just going to sleep, and I was really out of it.

And yeah, it needs to be a shipment. Example code:
[lua]AddCustomShipment(“Water Bottle”, “models/drug_mod/the_bottle_of_water.mdl”, “durgz_water”, 50, 10, true, 10, true, {TEAM_BARTENDER, TEAM_SALESMAN})[/lua]

That worked but now, the drugs wont go to a specific class it goes to all of them and anyone can spawn them. Here’s the code:


AddCustomShipment("Beer", "models/drug_mod/alcohol_can.mdl", "durgz_alcohol", 300, 1, true, 300, true, {TEAM_BARTENDER})
AddCustomShipment("Aspirin", "models/jaanus/aspbtl.mdl", "durgz_aspirin", 650, 1, true, 300, true, {TEAM_DRUGDEALER})
AddCustomShipment("Cigarettes", "models/boxopencigshib.mdl", "durgz_cigarette", 300, 1, true, 300, true, {TEAM_BARTENDER})
AddCustomShipment("Cocaine", "models/cocn.mdl", "durgz_cocaine", 500, 1, true, 300, true, {TEAM_DRUGDEALER})
AddCustomShipment("Heroine", "models/katharsmodels/syringe_out/syringe_out.mdl", "durgz_heroine", 550, 1, true, 300, true, {TEAM_DRUGDEALER})
AddCustomShipment("LSD", "models/smile/smile.mdl", "durgz_lsd", 450, 1, true, 300, true, {TEAM_DRUGDEALER})
AddCustomShipment("Shrooms", "models/ipha/mushroom_small.mdl", "durgz_shroom", 400, 1, true, 300, true, {TEAM_DRUGDEALER})
AddCustomShipment("Water", "models/drug_mod/the_bottle_of_water.mdl", "durgz_water", 200, 1, true, 300, true)
AddCustomShipment("Weed", "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", "durgz_weed", 500, 1, true, 300, true, {TEAM_DRUGDEALER})

I even did it without {} and still nothing happened.

I’m pretty sure this is the ConVar.
Do this in console.


RP_restrictbuypistol 1

-snip-