• how create table classes?
    0 replies, posted
table classes of DarkRP local base = { color = Color(0,0,0,255), model = "", description = "No description provided", weapons = {}, command = "cmd", max = 0, salary = 0, admin = 0, vote = false, hasLicense = false, NeedToChangeFrom = nil, customCheck = nil } RPExtraTeams = {} function AddExtraTeam(name, t) local base = table.Copy(base) table.Merge(base, t) t = base t.name = name local n = table.insert(RPExtraTeams, t) if n == 1 then PrintTable(t) end team.SetUp(n, name, t.color) timer.Simple(0, function() GAMEMODE:AddTeamCommands(t, t.max) end) if type(t.model) == "table" then for k,v in pairs(t.model) do util.PrecacheModel(v) end else util.PrecacheModel(t.model) end return n end my table create local tеst = { color = Color(0,0,0,255), model = "", } tests = {} function test(name,t) local test = table.Copy(test) table.Merge(test,t) t = test t.name = name local t = table.insert(tests, t) if type(t.model) == "table" then for k,v in pairs(t.model) do util.PrecacheModel(v) end else util.PrecacheModel(t.model) end return t end Is what i doing wrong?
Sorry, you need to Log In to post a reply to this thread.