Can someone please make me a script so that the items below can be bought by TEAM_METH for darkrp ?
eml_water
eml_sulfur
eml_stove
eml_spot
eml_pot
eml_macid
eml_jar
eml_iodine
eml_gas
Try using google for a change
[url]http://wiki.darkrp.com/index.php/DarkRP:Shipments[/url]
[CODE]
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>,
<OPTIONAL: price when sold seperately>,
<true/false OPTIONAL: /buy only = true>,
OPTIONAL which classes can buy the shipment,
OPTIONAL: the model of the shipment)
Example
AddCustomShipment("HL2pistol", "models/weapons/W_pistol.mdl", "weapon_pistol", 500, 10, false, 200, false, {TEAM_GUN})
[/CODE]
[code]
DarkRP.createShipment("Example shipment", {
model = "models/weapons/w_pist_fiveseven.mdl", -- The model of the item that hovers above the shipment
entity = "weapon_fiveseven2", -- the entity that comes out of the shipment
price = 100, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 100, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_GUN, TEAM_MEDIC}, -- 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)
customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
CustomCheckFailMsg = function(ply, shipment) return ply:Frags() >= 10 and "You killed too many people" end, -- Can be a simple string as well
weight = 15, -- OPTIONAL, the weight of the shipment. The default is the weight of the shipment
spareammo = 10, -- OPTIONAL, Add ammo to the default amount of ammo for every weapon
clip1 = 10, -- OPTIONAL, The amount of bullets in the primary clip by default
clip2 = 10, -- OPTIONAL, The amount of bullets in the secondary clip by default
buttonColor = Color(255, 255, 255, 255), -- Optional: The color of the button in the F4 menu,
label = "Super pistol", -- Optional: the text on the button in the F4 menu
category = "Other", -- The name of the category it is in. Note: the category must be created!
sortOrder = 100, -- The position of this thing in its category. Lower number means higher up.
-- Advanced, optional
shipmentClass = "spawned_shipment", -- The classname of the shipment entity. Use this if you have made a different shipment entity
onBought = function(ply, shipment, ent) end, -- function that is called when the shipment is bought
getPrice = function(ply, price) return ply:GetNWString("usergroup") == "donator" and price * 0.9 or price end, -- function to decide what the price is based on the player
spawn = function(shipment_ent, shipment_data) print("Spawn custom entity and place it") end, -- Function to override how the shipment spawns the weapon when used.
})
[/code]
[QUOTE=Nick78111;48469481][code]
DarkRP.createShipment("Example shipment", {
model = "models/weapons/w_pist_fiveseven.mdl", -- The model of the item that hovers above the shipment
entity = "weapon_fiveseven2", -- the entity that comes out of the shipment
price = 100, -- the price of one shipment
amount = 10, -- how many of the item go in one purchased shipment
separate = true, -- whether the item is sold separately (usually used for guns)
pricesep = 100, -- the price of a separately sold item
noship = false, -- whether this item has a shipment
allowed = {TEAM_GUN, TEAM_MEDIC}, -- 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)
customCheck = function(ply) return ply:Frags() < 10 end, -- OPTIONAL, extra conditions before people can purchase the shipment or separate item
CustomCheckFailMsg = function(ply, shipment) return ply:Frags() >= 10 and "You killed too many people" end, -- Can be a simple string as well
weight = 15, -- OPTIONAL, the weight of the shipment. The default is the weight of the shipment
spareammo = 10, -- OPTIONAL, Add ammo to the default amount of ammo for every weapon
clip1 = 10, -- OPTIONAL, The amount of bullets in the primary clip by default
clip2 = 10, -- OPTIONAL, The amount of bullets in the secondary clip by default
buttonColor = Color(255, 255, 255, 255), -- Optional: The color of the button in the F4 menu,
label = "Super pistol", -- Optional: the text on the button in the F4 menu
category = "Other", -- The name of the category it is in. Note: the category must be created!
sortOrder = 100, -- The position of this thing in its category. Lower number means higher up.
-- Advanced, optional
shipmentClass = "spawned_shipment", -- The classname of the shipment entity. Use this if you have made a different shipment entity
onBought = function(ply, shipment, ent) end, -- function that is called when the shipment is bought
getPrice = function(ply, price) return ply:GetNWString("usergroup") == "donator" and price * 0.9 or price end, -- function to decide what the price is based on the player
spawn = function(shipment_ent, shipment_data) print("Spawn custom entity and place it") end, -- Function to override how the shipment spawns the weapon when used.
})
[/code][/QUOTE]
You truely are an idiot.... The code from the wiki will work just aswell as the code you posted
[highlight](User was banned for this post ("flaming" - Orkel))[/highlight]
[QUOTE=DiscoKnight;48472552]You truely are an idiot.... The code from the wiki will work just aswell as the code you posted[/QUOTE]
AddCustomShipment is deprecated.
Hang on, EML "Enhanced Meth Lab" all ready has that code in it. Unless you leaked it then I don't know...
I believe these are entities.
Try looking at this [url]http://wiki.darkrp.com/index.php/DarkRP:CustomEntityFields[/url]
Sorry, you need to Log In to post a reply to this thread.