• shipment entities screwed up
    3 replies, posted
Ok so here is my code for shipments, [url]http://pastebin.com/cpHWe6Kf[/url] here is my issue. spawn in a shipment, has the right entity floating above it, but as soon as i hit "e" on it an ak47 spawns, but when i pick up the "ak47" it give me the correct gun. this also happens when spawning in separate weapons. any ideas?
Not sure if this is related or not, but you have two different ak-47 shipments, which seems pointless to me. Also you have a LOT of unnecessary commented out code. It's a pain to look through, also, please post it on the forums in [noparse][code][/code][/noparse] tags, as the pastebin.com syntax highlighter sucks even more than the FP one, imo.
hmm, the second ak 47 you saw was an ak "74" and for my code, cleaned it up a bit, and here you go. [CODE]/*--------------------------------------------------------------------------- DarkRP custom shipments and guns --------------------------------------------------------------------------- This file contains your custom shipments and guns. This file should also contain shipments and guns from DarkRP that you edited. Note: If you want to edit a default DarkRP shipment, first disable it in darkrp_config/disabled_defaults.lua Once you've done that, copy and paste the shipment to this file and edit it. The default shipments and guns can be found here: https://github.com/FPtje/DarkRP/blob/master/gamemode/config/addentities.lua For examples and explanation please visit this wiki page: http://wiki.darkrp.com/index.php/DarkRP:CustomShipmentFields Add shipments and guns under the following line: ---------------------------------------------------------------------------*/ DarkRP.createEntity("Drug lab", { ent = "drug_lab", model = "models/props_lab/crematorcase.mdl", price = 400, max = 3, cmd = "buydruglab", allowed = {TEAM_BMD} }) --Drugs AddCustomShipment("Water", { model = "models/drug_mod/the_bottle_of_water.mdl", entity = "drugz_water", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Asprin", { model = "models/jaanus/aspbtl.mdl", entity = "durgz_asprin", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Cigarette", { model = "models/boxopencigshib.mdl", entity = "durgz_cigarette", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Alcohol", { model = "models/drug_mod/alcohol_can.mdl", entity = "durgz_alcohol", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Heroine", { model = "models/katharsmodels/syringe_out/syringe_out.mdl", entity = "drugz_heroine", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("LSD", { model = "models/smile/smile.mdl", entity = "drugz_lsd", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Weed", { model = "models/katharsmodels/contraband/zak_wiet/zak_wiet.mdl", entity = "drugz_weed", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Mushroom", { model = "models/ipha/mushroom_small.mdl", entity = "drugz_mushroom", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Cocaine", { model = "models/cocn.mdl", entity = "drugz_cocaine", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("PCP", { model = "models/cocn.mdl", entity = "drugz_pcp", price = 2000, amount = 10, separate = true, pricesep = 190, noship = false, allowed = {TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) --FAS2 Weapons AddCustomShipment("AK-47", { model = "models/weapons/w_ak47.mdl", entity = "fas2_ak47", price = 12000, amount = 10, separate = true, pricesep = 1200, noship = false, allowed = {TEAM_GUN}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("AK-74", { model = "models/weapons/view/rifles/ak74.mdl", entity = "fas2_ak74", price = 12000, amount = 10, separate = true, pricesep = 1200, noship = false, allowed = {TEAM_GUN}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("G3", { model = "models/weapons/w_g3a3.mdl", entity = "fas2_g3", price = 12000, amount = 10, separate = true, pricesep = 1200, noship = false, allowed = {TEAM_GUN}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Glock20", { model = "models/weapons/w_glock20.mdl", entity = "fas2_glock20", price = 2000, amount = 10, separate = true, pricesep = 200, noship = false, allowed = {TEAM_GUN, TEAM_BMD}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("M24", { model = "models/weapons/w_m24.mdl", entity = "fas2_m24", price = 24000, amount = 10, separate = true, pricesep = 2400, noship = false, allowed = {TEAM_GUN}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Mp5a5", { model = "models/weapons/w_mp5.mdl", entity = "fas2_mp5a5", price = 8000, amount = 10, separate = true, pricesep = 800, noship = false, allowed = {TEAM_GUN}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("pp19", { model = "models/weapons/view/smgs/bizon.mdl", entity = "fas2_pp19", price = 12000, amount = 10, separate = true, pricesep = 1200, noship = false, allowed = {TEAM_GUN}, shipmodel = "models/items/item_item_crate.mdl", weight = 15, buttonColor = Color(255, 255, 255, 255), }) AddCustomShipment("Raging Bull", { model = "models/weapons/view/pistols/ragingbull.mdl", entity = "fas2_ragingbull", price
Anyone?
Sorry, you need to Log In to post a reply to this thread.