• DarkRP, how to get singular entities instead of full shipments. (DrugsMod)
    3 replies, posted
I recently set up DrugsMod on my DarkRP server, and I have a command line in my addentities.lua file under config allowing drug dealers and other allowed classes to spawn shipments. What I'm trying to figure out is how to be able to buy individual entities instead of full shipments. P.S. I'm new to this site so I don't know how to paste command lines in the fancy ways I've seen people do it.
Welcome to Facepunch, here's the DarkRP help thread: [url]http://facepunch.com/showthread.php?t=1249475[/url] I know about adding shipments, as for the single items: [lua]separate = true, -- whether the item is sold separately (usually used for guns)[/lua] Shipment fields: [url]http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields[/url]
Where would I put this in the code? For example this is what they all look like in terms of codes, with varying names and teams. AddCustomShipment("Water", "models/drug_mod/the_bottle_of_water.mdl", "durgz_water", 30, 15, true, 30, true, {TEAM_DRUGZ}) Like I stated, I don't know how to go all fancy code like.
You must be using the old style of adding shipments; unless that also exists. The second argument is a table: [lua]AddCustomShipment( "Water", { model = "models/drug_mod/the_bottle_of_water.mdl"; entity = "durgz_water"; price = 450; -- the price of one shipment amount = 15; -- how many of the item go in one purchased shipment separate = true; -- whether the item is sold separately (usually used for guns) pricesep = 30; -- the price of a separately sold item noship = false; -- whether this item has a shipment allowed = { TEAM_DRUGZ }; -- OPTIONAL, which teams are allowed to buy this shipment/separate gun shipmodel = "models/items/item_item_crate.mdl", -- OPTIONAL, the model of the shipment (this crate is the default) buttonColor = Color( 255, 255, 255, 255 ); -- Optional: The color of the button in the F4 menu, } );[/lua] If this solves your question, please click solved in the top left corner. And for future DarkRP questions, please ask in the designated DarkRP Help thread.
Sorry, you need to Log In to post a reply to this thread.