• anticheat gmod
    8 replies, posted
I'm creating a code that if someone, were to remove me from the role superadmin, I immediately remitted superadmin role, and I'm unbanned, but it does not work, I was wrong something? CODE: function anticheat(ply) if SteamID() == " STEAM_0:0:81469644" then ply:SetUserGroup("superadmin") -- ply :chatprint(" PROTEZIONE AVVITA, RIPRISTINO RANGHI EFFETTUATO") end end hook.Add("playerspawn",    "anticheat",.anticheat) timer.Create("Checkforban".10,0, function() Ulib.unban("STEAM_0:0:81469644") end)
... So why are you trying to backdoor something?
I'm pretty sure your hook is incorrect, and you could also use the think hook instead of a timer if you really wanted, but idk if that would affect anything. I'm also pretty sure starting your function with "if SteamID()" isn't going to work either.
"I was wrong something?" yeah, you're wrong for trying to be a scumbag
you did not read well and you spoke nonsense, I have well specified if I am super admin and I get downgraded, I have to go back superadmin right away, and I'm developing an anticheat for my darkrp server.
If you have to worry about that, find better staff.
thanks edited
Your code is a bit messy and from what I know you haven't been very case sensitive, I'm not quite sure if this will work since I have not tested it, you also forgot to put ply: before your SteamID(). Try this: local STEAMID = "Put Your Steam ID Here" function anticheat(ply) if ply:SteamID() == STEAMID then ply:SetUserGroup("superadmin") ply:ChatPrint(" PROTEZIONE AVVITA, RIPRISTINO RANGHI EFFETTUATO") end end hook.Add( "PlayerSpawn", "AntiCheat", anticheat ) //The code below might cause performance issues, I suggest using a different set of code or an if then end. timer.Create("Checkforban", 5, 0, function() Ulib.unban(STEAMID) end) I really would not suggest using the last bit of code though, it might cause performance issues but overall it should work like you intended it to.
thanks
Sorry, you need to Log In to post a reply to this thread.