How To Change User

How would I make it so that whenever anyone joins my server, they become superadmin instead of user?

What admin system are you using, if any?

None…I just want a build/fun server

local PLAYER = GetMetTable("Player")
function PLAYER:IsAdmin() return true end
function PLAYER:IsSuperAdmin() return true end

You might want to remove the kickid2 and banid2 console commands if you’re doing it that way.

I dont understand what those are…or how to disable them



Im stupid

While I understand what you’re asking for in the OP, this is potentially an issue. You would be better off installing an admin system (from what you’re saying, it sounds like you just need something basic like this).

Build/fun servers can go horribly wrong when people abuse things (props, toolguns, etc). Setting everyone who joins to superadmin is bad.


Edit: Im still curious

if ply:GetUserGroup=(“User”)
then “ulx adduser ^ superadmin”

Just make them superadmin on initialspawn but add also a check if they’re already superadmin.

hook.Add ("PlayerInitalSpawn", "blabla", function (ply)
if not ply:IsSuperAdmin() then
 RunConsoleCommand ("ulx", "adduserid", ply:SteamID(), "superadmin")

No, it wouldn’t. That’s not how functions work. Defining a string, and not setting it to anything, would cause errors. Just run it in a console command…

RunConsoleCommand(“ulx”, “adduser”, ply:Nick(), “superadmin”);

Dude, thank you so much…this is a lot easier to understand!

;rcon_password ayylmao;

Good thinking but RunConsoleCommand properly passes the arguments to the concommand. And even if it did work rcon_password is a blocked command.