• DarkRP - Remove default ammo
    6 replies, posted
  • 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? :smile:
  • Avatar of TheDivinity
  • Remove lines 660-662 in ShowTeamtabs.lua, or [lua]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")[/lua] Look for that instead and remove them.
  • If you really want to delete the default ammo, you should also look up the part of the code where it actually [B]gives[/B] you the ammo, so you also cant type /buyammo rifle.
  • Avatar of #NaN
  • [QUOTE=Darkwater124;32939609]If you really want to delete the default ammo, you should also look up the part of the code where it actually [B]gives[/B] you the ammo, so you also cant type /buyammo rifle.[/QUOTE] He has already removed it. [QUOTE=Blaine500;32928506]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? :smile:[/QUOTE]
  • 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.