1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Need Help on Addon

Discussion in 'DarkRP Modding Questions & Help' started by sadpanda, Oct 18, 2013.

  1. sadpanda

    sadpanda New Member

    I need some help on making certain jobs donator. I had a script in player.lua doing it butim not sure where to put it in the darkrp addon. I tried following what it said on the wiki but it kept giving me an error saying I was missing a }, and when I added it, it gave more errors. How would I make jobs donator only?
    Last edited: Oct 18, 2013
  2. TypicalRookie

    TypicalRookie Active Member

  3. sadpanda

    sadpanda New Member

    I have read wiki, not sure if im doing it wrong but here you go:

    Code (Text):
    TEAM_DOUBLEAGENT = AddExtraTeam("Double Agent", {
        color = Color(0, 63, 255, 255),
        model = "models/player/barney.mdl",
        description = [[You are a double agent. You have gone rogue.
        You now raid others for your own benefit.]],
        weapons = {"lockpick", "keypad_cracker"},
        command = "doubleagent",
        max = 2,
        salary = 60,
        admin = 0,
        vote = false,
        hasLicense = false
        customCheck = function(ply) return ply:CheckGroup("donator") end
  4. TypicalRookie

    TypicalRookie Active Member

    You need a comma after hasLicense = false or else it wont work.
  5. sadpanda

    sadpanda New Member

    Okay thanks for the help, that fixed it. I have 2 more questions, how would I sell a gun separately as both a shipment and a single weapon, I currently have it so it only sells as shipments. How would I change this? The second question is how would I make it so the money printers are not able to be bought from jobs such as the mayor, cp, etc.

    Code (Text):
    AddEntity("Money Printer", {
        ent = "money_printer",
        model = "models/props_c17/consolebox01a.mdl",
        price = 2000,
        max = 3,
        cmd = "/buymoneyprinter",
        customCheck = function(ply)
            return not ply:IsCP()
    This is what I used but returned an error stating IsCP is a nil value.
    Last edited: Oct 19, 2013
  6. TypicalRookie

    TypicalRookie Active Member

    On your shipment, set it like this to make it a shipment and seperate
    seperate = true,
    pricesep = 300,
    noship = false,

    And you can add this to set which teams are allowed to buy an item
    allowed = {TEAM_NAME}
  7. sadpanda

    sadpanda New Member

    Tried that and it give me an error talking about needing a } and having an unexpected symbol.

    Code (Text):
    AddCustomShipment("Glock 18", {
        model = "models/weapons/w_pist_glock18.mdl",
        entity = "cstm_pistol_glock18",
        price = 3150,
        amount = 10,
        seperate = true,
        pricesep = 350,
        noship = false,
    Also is there another way besides allowed, instead of needing me to type all the jobs in. I only want the CP/Mayor not be able to buy it.

Share This Page