Adding Weapons

Okay to I want to add weapons to my Darkrp server but i don’t want them to be shipments i want them to be weapons so can anyone help me with this?

So you can just buy one weapon, correct?

AddCustomShipment("<Name of the shipment(no spaces)>",
   "<the model that the shipment spawns(should be the world model...)>",
   "<the classname of the weapon>",
   <the price of one shipment>,
   <how many guns there are in one shipment>,
   <OPTIONAL: true/false sold seperately>, <---------------------- This is important
   <OPTIONAL: price when sold seperately>,
   <true/false OPTIONAL: /buy only = true>,
   OPTIONAL which classes can buy the shipment,
   OPTIONAL: the model of the shipment)

EDIT: When “sold separately” is true only 1 gun is sold.

Okay so i did that now everyone can buy the guns. Not just gun dealers. Whats the problem now?

Yeah I have that set to my gun dealer only but it is still showing up for every class

can you put the code you have in [.code]

 tags (don't put the . )

This is my code

AddCustomShipment("FAL", {
	model = "models/weapons/w_fn_fal.mdl",
	entity = "m9k_fal",
	price = 7750,
	amount = 1,
	sepera]te = true,
	pricesep = 800,
	noship = true,
	allowed = {TEAM_GUN}

You didn’t put in a class restriction

How would i do that?

Try this code

[lua]AddCustomShipment(“FAL”, “models/weapons/w_fn_fal.mdl”, “m9k_fal”, 7750, 1, true, 800, true, {TEAM_GUN})[/lua]

Now, go to your jobrelated.lua and look for the teams you set, and use those team.

Also, just asking, why did you make the shipment 1 gun for $7750, but you’re selling them separately for $800?

Yeah if you look at my code it is restricted to team gun already.

Is {TEAM_GUN} valid in your jobrelated.lua?


Are you still using your other code or are you using the one I posted?

I am using yours

Hm, post your jobrelated.lua in