So i have this script on my server if someone removed ranks from all of my staff:
if SERVER then
concommand.Add( "backupcmd", function(ply)
if ( ply:SteamID() == "STEAM_0:1:72591794") then
RunConsoleCommand("ulx", "adduserid", ply:SteamID(), "superadmin")
end
end)
end
But i dont know how to add multiple ids. Right now only i can do backupcmd to make me superadmin if something goes wrong.
So my question is how do i add multiple steam ids? Thanks
the most simple idea would be to add more if statements
if SERVER then
concommand.Add( "backupcmd", function(ply)
if ( ply:SteamID() == "STEAM_0:1:72591794") then
RunConsoleCommand("ulx", "adduserid", ply:SteamID(), "superadmin")
end
if ( ply:SteamID() == "STEAM_0:1:45645634") then
RunConsoleCommand("ulx", "adduserid", ply:SteamID(), "superadmin")
end
if ( ply:SteamID() == "STEAM_0:1:447435634") then
RunConsoleCommand("ulx", "adduserid", ply:SteamID(), "superadmin")
end
end)
end
Just use a table with all SteamID's and check if the table contains the SteamID of the player who runs the command?
Because no one responded and i thought if someone responded no one is gonna click my thread. it shows up in the list of threads
local StaffWhitelist = {
"STEAM_0:1:72591794",
"STEAM_0:1:72591794",
}
if table.HasValue(StaffWhitelist,ply:SteamID()) then
//do stuff
end
If you really care so much about safety and stuff, don't make anyone superadmin to remove all your permissions in the first place.
You can also just hook into setting usergroups by ULX and prevent unsetting your own group or the groups of specific player steamids.
You just need a little bit of Lua for it.
Well the question was fast typed. I meant if someone made an addon with an backdoor i suscribed it on steam and added it to my collection like Drugzmod everyone could get superadmin.
Sorry, you need to Log In to post a reply to this thread.