1. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

This weapon is unavailable single shipment error.

Discussion in 'DarkRP Modding Questions & Help' started by mastor snipor, Dec 25, 2014.

  1. mastor snipor

    mastor snipor New Member

    My single shipments randomly stopped working yesterday. When you try to buy a single weapon, it says "This Weapon is Unavailable". But shipments of weapons work perfectly fine. Here is a example of a single line for one of my guns. My server is running DarkRP 2.5.1 Github.

    AddCustomShipment("AK47", "models/weapons/w_ak47.mdl", "fas2_ak47", 13250, 10, true, 1700, true, nil, nil, function(ply) return ply:Team() == TEAM_GUN end)
     
  2. Pab14567

    Pab14567 Well-Known Member

    My tutorial about FAS2, shipments and attachments tutorial will be posted shortly, once a moderator post it but here try this

    AddCustomShipment("AK-47 ", "models/weapons/w_ak47.mdl", "fas2_ak47", 4500, 1, false, 500, false, {TEAM_GUN})
    THE NIL VALUE shouldn't be there
     
  3. mastor snipor

    mastor snipor New Member

    It works, except every job can buy the weapon.
     
  4. Pab14567

    Pab14567 Well-Known Member

    Weird, on my server that's not happening, try your function to see if it works,
     
  5. mastor snipor

    mastor snipor New Member

    Fixed, I updated darkrp yesterday and that broke it. Reverted to my older version of 2.5.1 and it works fine.
     
  6. Bzzlightyear

    Bzzlightyear New Member

    I am having this same issue but do not want to revert to a previous version, Do we know why this is happening so we can have this working with 2.6?
     
  7. Pab14567

    Pab14567 Well-Known Member

    More than likely something you did wrong. On my server they work perfectly, fine. Is there any errors that pop up ?
     
  8. Bzzlightyear

    Bzzlightyear New Member

    No, could you send me what you have in your shipments folder so I can compare to mine, I even took out all of my addons to see if one was causing it with no luck. It has to be something with one of my files.
     
  9. VAC Secure

    VAC Secure New Member

    I have this code and it says "you do not have the right job to /buyshipment"
    and this is the code

    AddCustomShipment("Handcuffs", {
    model = "models/weapons/c_stunstick.mdl",
    entity = "handcuffs",
    price = 5000,
    amount = 1,
    separate = false,
    pricesep = 1000,
    noship = false,
    allowed = {TEAM_SWAT}
    })


    can anyone help me?
     
  10. Feldma

    Feldma Member

    Are you sure that TEAM_SWAT is the job name?

    EDIT: That bump though.
     
  11. GotWaffle

    GotWaffle New Member

    DarkRP.createShipment("Winchester 73", {
    model = "models/weapons/w_winchester_1873.mdl",
    entity = "m9k_winchester73",
    price = 50000,
    amount = 10,
    separate = false,
    pricesep = false,
    noship = false,
    allowed = {TEAM_GUN},
    })

    singles work but ships dont... halp!
     
  12. CGFier

    CGFier Member

    Some of these issues have to be your server. They work fine for me.
     
  13. viper542

    viper542 Active Member

    I've had this problem and my problem was this (using your example shipment):

    Code (Text):

    -- Single example
    DarkRP.createShipment("Winchester 73", {
    model = "models/weapons/w_winchester_1873.mdl",
    entity = "m9k_winchester73",
    price = 50000,
    amount = 10,
    separate = true,
    pricesep = 5000,
    noship = true,
    allowed = {TEAM_GUN},
    })

    -- Shipment Example
    DarkRP.createShipment("Winchester 73", {
    model = "models/weapons/w_winchester_1873.mdl",
    entity = "m9k_winchester73",
    price = 50000,
    amount = 10,
    separate = false,
    pricesep = 5000,
    noship = false,
    allowed = {TEAM_GUN},
    })
    You probably assigned the same name for both of your shipments and singles. The reason why only the Singles work is probably because your singles comes first then your shipments.
    It's a simple fix really.

    Code (Text):

    -- Single Example
    DarkRP.createShipment("Winchester 73", {
    model = "models/weapons/w_winchester_1873.mdl",
    entity = "m9k_winchester73",
    price = 50000,
    amount = 10,
    separate = true,
    pricesep = 5000,
    noship = true,
    allowed = {TEAM_GUN},
    })

    -- Shipment Example
    DarkRP.createShipment("Winchester 73 Shipment", { -- I added the word shipment, so the names won't conflict.
    model = "models/weapons/w_winchester_1873.mdl",
    entity = "m9k_winchester73",
    price = 50000,
    amount = 10,
    separate = false,
    pricesep = 5000,
    noship = false,
    allowed = {TEAM_GUN},
    })
    This is how I solved my problem, I hope it helps you too. :)
     
  14. Potassium

    Potassium New Member

    Thanks this helped alot and i just wanted to note that you have to restart your server.
     

Share This Page