• Question TIME :D
    0 replies, posted
Hey everyone my question is how do I make another tab in the F4 menu in the shop tab how do I add another spolier or whatever its called and not have the same entities. I made the spoiler by making a new addentities caller, and I added thing instead of it adding to entities it adds to another tab so for example: It would naturally look like this: [CODE]AddEntity("9MM Ammo", { ent = "ent_mad_ammo_9mm", model = "models/Items/item_item_crate.mdl", price = 20, max = 99, cmd = "/buyammo1", }) [/CODE] But I made it look like this: [CODE]AddAmmo("9MM Ammo", { ent = "ent_mad_ammo_9mm", model = "models/Items/item_item_crate.mdl", price = 20, max = 99, cmd = "/buyammo1", })[/CODE] And for some reason it wont buy it... Btw I edited MakesThings.lua and I copyed the entity one and changed it to AddAmmo [CODE]DarkRPAddAmmo = {} function AddAmmo(name, entity, model, price, max, command, classes, CustomCheck) local tableSyntaxUsed = type(entity) == "table" if not name or not entity or not tableSyntaxUsed and (not price or not command) then hook.Add("PlayerSpawn", "ItemError", function(ply) if ply:IsAdmin() then ply:ChatPrint("WARNING: Item made incorrectly, failed to load!") end end) return end local tblEnt = tableSyntaxUsed and entity or {ent = entity, model = model, price = price, max = max, cmd = command, allowed = classes, customCheck = CustomCheck} tblEnt.name = name if type(tblEnt.allowed) == "number" then tblEnt.allowed = {tblEnt.allowed} end table.insert(DarkRPAddAmmo, tblEnt) end[/CODE] [IMG]http://cloud.steampowered.com/ugc/596992393072299844/714495C4B6B3AA86634CBC021DFA8AAA1E9159A7/[/IMG] And Yes I am using Mad Cows Swep.. [editline]10th January 2013[/editline] Request Close - Fixed!
Sorry, you need to Log In to post a reply to this thread.