• Admin Lua?
    3 replies, posted
How do i add myself as admin on my server? Somebody said make a lua that was like "if ply: steamID = "" superadmin" Idk, any help? I used to remember but then i forgot.
[QUOTE=Moja;21223723]How do i add myself as admin on my server? Somebody said make a lua that was like "if ply: steamID = "" superadmin" Idk, any help? I used to remember but then i forgot.[/QUOTE] Guess you could do: [lua] --UNTESTED! local PlySteamID = "SteamID Here!" for k, ply in pairs(player.GetAll()) do if ply:SteamID( ) == PlySteamID then ply:SetUserGroup("superadmin") end end [/lua] or add you're self in the users.txt ([url]http://wiki.garrysmod.com/?title=Admin[/url])
you could always add this into an autorun file :) [CODE] hook.Add("PlayerInitialSpawn", "addmeadmin", function( ply ) local admins = {} admins["you"] = "YOUR_STEAMID_GOES_HERE!" for k,v in ipairs(admins) do if ply:SteamID() == v then v:SetUserGroup("Admin") end end end) [/CODE]
Thanks everyone! I found out it was Users.Txt!
Sorry, you need to Log In to post a reply to this thread.