• Ammo category
    6 replies, posted
ok so when i create a category DarkRP.createCategory{     name = "Ammo",     categorises = "ammo",     startExpanded = true,     color = Color(0, 0, 0, 255),     canSee = function(ply) return true end,     sortOrder = 0 } And i put ammo in the category DarkRP.createEntity("Sniper Ammo", {     ent = "m9k_ammo_sniper_rounds",     model = "models/Items/BoxSRounds.mdl",     price = 200,     max = 2,     cmd = "buysnipammo", category = "Ammo", }) I still get a lua error and it makes a category in the entity section called ammo. But there is a category called Ammo but it still creates a category in entities called ammo. Any help? Thanks     
what even?
whats the lua error?
Default Ammo Types
you create a new entity that call "Sniper Ammo", why ? to create "Sniper Ammo" you need to use with DarkRP.createAmmoType() put this in addons/darkrpmodification/lua/darkrp_customthings/ammo.lua DarkRP.createAmmoType("Sniper Ammo", { name = "Sniper Ammo", model = "models/Items/BoxSRounds.mdl", price = 200, amountGiven = 2 }) You dont need to create new category !
As @Bluzer said you don't need to create new category for ammo,here is my code that you can find in darkrp_customthings/ammo.lua I have "allowed" since I have multiple gun dealer jobs DarkRP.createAmmoType("SniperPenetratedRound", {     name = "Sniper Ammo",     model = "models/Items/BoxMRounds.mdl",     price = 3500,     allowed = {TEAM_BLACK},     amountGiven = 10 })
"Dumb"
Sorry, you need to Log In to post a reply to this thread.