Alright, so before I posted this, JUST FOR EVERYONE TO KNOW, I did search the problem, none fixed it.
Anyways, so i’m trying to get this to work for my test gamemode.
team4:SetParent(changeteam) team4:SetText("Republic 501st") team4:SetPos(150, 70) team4:SetSize(150, 50) team4.DoClick = function(ply) if !ply:IsSuperAdmin() or !ply:IsAdmin() then RunConsoleCommand("sw_setteam4") end end end
How ever, all I get from it is:
[ERROR] gamemodes/swcw/gamemode/cl_init.lua:69: attempt to call method 'IsSuperAdmin' (a nil value) 1. DoClick - gamemodes/swcw/gamemode/cl_init.lua:69 2. unknown - lua/vgui/dlabel.lua:206
How does one fix this problem?