1. Post #1

    October 2011
    2 Posts
    Hey guys. Added Mad Cows weapons to DarkRP and I'm in the process of redoing the ammo system and have different ammo types working, but for the life of me, I can't figure out how to remove the default Pistol/Buckshot/Rifle ammo completely. Tried commenting out the code in main.lua, but that leaves them selectable and /buyammo just appears in the chat window when clicking, so it can't just be that. Any hints?

  2. Post #2
    Divinity Roleplay
    TheDivinity's Avatar
    August 2011
    518 Posts
    Remove lines 660-662 in ShowTeamtabs.lua, or

    AddIcon("models/Items/BoxSRounds.mdl", string.format(LANGUAGE.buy_a, "Pistol ammo", CUR .. tostring(GetConVarNumber("ammopistolcost"))), "/buyammo pistol")
    AddIcon("models/Items/BoxMRounds.mdl", string.format(LANGUAGE.buy_a, "Rifle ammo", CUR .. tostring(GetConVarNumber("ammoriflecost"))), "/buyammo rifle")
    AddIcon("models/Items/BoxBuckshot.mdl", string.format(LANGUAGE.buy_a, "Shotgun ammo", CUR .. tostring(GetConVarNumber("ammoshotguncost"))), "/buyammo shotgun")


    Look for that instead and remove them.

  3. Post #3

    October 2011
    2 Posts
    Cheers! That's the one.

  4. Post #4
    If you really want to delete the default ammo, you should also look up the part of the code where it actually gives you the ammo, so you also cant type /buyammo rifle.
    Reply With Quote Edit / Delete Reply Windows 8 Netherlands Show Events Agree Agree x 1 (list)

  5. Post #5
    pennerlord's Avatar
    February 2011
    504 Posts
    If you really want to delete the default ammo, you should also look up the part of the code where it actually gives you the ammo, so you also cant type /buyammo rifle.
    He has already removed it.

    Tried commenting out the code in main.lua, but that leaves them selectable and /buyammo just appears in the chat window when clicking, so it can't just be that. Any hints?

  6. Post #6

    February 2014
    3 Posts
    What folder contains ShowTeamtabs.lua and the lines of code I need to remove?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 1 (list)

  7. Post #7

    January 2014
    9 Posts
    You don't do that anymore, you go into the darkrpmodification addon, then lua then darkrp_config then disabled_defaults. Find line 124 then disable the ammo you want disabled.

    Also, don't bump old threads.