• Anyone willing to share m9k shipment codes?
    9 replies, posted
I was coming to ask if anyone would be willing to share their shipment codes for the M9K guns. All the codes I have must be old, because they sort all guns into "other"
[URL]http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields[/URL] you can make them yourselves here. Take note of the 'category' variable
[QUOTE=smithy285;48105015][URL]http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields[/URL] you can make them yourselves here. Take note of the 'category' variable[/QUOTE] Yeah, I know that just takes a good amount of time.. I've done my pistols, but the category isn't working. DarkRP.createCategory{ name = "Pistols", categorises = "weapons", startExpanded = true, color = Color(35, 178, 67, 255), canSee = function(ply) return true end, sortOrder = 25, }
Did you even read through your code? It's not categorises
[QUOTE=Persious;48105182]Did you even read through your code? It's not categorises[/QUOTE] Yes it is: [url]http://wiki.darkrp.com/index.php/DarkRP:Categories[/url] [code] DarkRP.createCategory{ name = "Citizens", categorises = "jobs", startExpanded = true, color = Color(0, 107, 0, 255), canSee = function(ply) return true end, sortOrder = 100, } [/code]
[QUOTE=Adzter;48105442]Yes it is: [url]http://wiki.darkrp.com/index.php/DarkRP:Categories[/url] [code] DarkRP.createCategory{ name = "Citizens", categorises = "jobs", startExpanded = true, color = Color(0, 107, 0, 255), canSee = function(ply) return true end, sortOrder = 100, } [/code][/QUOTE] Using that code, I ended up with [ERROR] A runtime error has occurred in "your custom shipments" on line -1. The best help I can give you is this: The category of "Python" ("Pistols") does not exist! Hints: - Make sure the category is created with DarkRP.createCategory. - The category name is case sensitive! - Categories must be created before DarkRP finished loading. The responsibility for this error lies with (the authors of) one (or more) of these files: your custom shipments ------- End of Simplerr error ------- this is the shipment it is referring to -- all pistol shipments are structured as such. DarkRP.createShipment("Python", { model = "models/weapons/w_colt_python.mdl", -- The model of the item that hovers above the shipment entity = "m9k_coltpython", -- the entity that comes out of the shipment price = 2500, -- 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 = 755, -- the price of a separately sold item noship = false, -- whether this item has a shipment allowed = {TEAM_GUN}, -- 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 = "Python", -- Optional: the text on the button in the F4 menu category = "Pistols", -- 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 })
Did you read this: [quote=your error] - Make sure the category is created with DarkRP.createCategory. - The category name is case sensitive! - Categories must be created before DarkRP finished loading. [/quote]
[QUOTE=bobbleheadbob;48105512]Did you read this:[/QUOTE] I must not be understanding that part. What do I need to do exactly?
[QUOTE=sirlenopow;48105550]I must not be understanding that part. What do I need to do exactly?[/QUOTE] [quote] The category of "Python" ("Pistols") does not exist! [/quote] you said it yourself
[QUOTE=smithy285;48115374]you said it yourself[/QUOTE] I've already got a category called pistols. The gun itself wouldnt need its own category. I'm using the default rifles category for my rifles, and they are coded the same way as my pistols, but simply using "rifles" instead of "pistols". I need my pistols category to work.
Sorry, you need to Log In to post a reply to this thread.