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?
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.
Cheers! That’s the one.
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.
What folder contains ShowTeamtabs.lua and the lines of code I need to remove?
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.