Superadmin Whitelist

  • Initiateur de la discussion
R

Riper Gaming

Geek
Messages
2
Score réaction
0
Points
65
Salut j'ai vu un code qui permet de whitelist les personnes autorisé à devenir superadmin par leur steamid64. Cependant en le mettant sur mon serveur qui utilise Sam Admin Mod cela ne fonctionne pas. Si quelqu'un pourrait m'aider cela serai fort appréciable.

Code:
StaffMod.Config.SuperadminWhitelist = { ["superadmin"] = { ["76568113010055955"] = true, ["76561198385412528"] = true, ["76561198541256609"] = true, ["76561197821367196"] = true }
}
local meta = FindMetaTable("Player")
local oldSetUsergroup = meta.SetUserGroup
function meta:SetUserGroup(groupName) if StaffMod.Config.SuperadminWhitelist[groupName] and not StaffMod.Config.SuperadminWhitelist[groupName][self:SteamID64()] then MsgC(Color(255, 0, 0, 255), "[Anti Cheat]", Color(255, 255, 255, 255), " "..self:Name().." ("..self:SteamID64()..") à essayé de devenir "..groupName.." sans autorisation.") self:Ban(0, false) self:Kick("Anti Cheat : Force OP "..groupName) return end oldSetUsergroup(groupName)
end
Console Erreur:
ServerLog: [FAdmin] Michael Davis (STEAM_0:1:189896213) Spawned for the first time
[sam-146] lua/includes/extensions/player_auth.lua:63: attempt to call method 'SetNWString' (a nil value)
1. oldSetUsergroup - lua/includes/extensions/player_auth.lua:63
2. SetUserGroup - addons/staffmod/lua/staff_mod_system/server/sv_functions.lua:77
3. callback - addons/sam-146/lua/sam/player/sv_auth.lua:46
4. FQuery - addons/sam-146/lua/sam/libs/sql/databases/sqlite.lua:69
5. v - addons/sam-146/lua/sam/player/sv_auth.lua:63
6. unknown - lua/includes/modules/hook.lua:84
[ERROR] gamemodes/militaryrp/gamemode/modules/base/sv_gamemode_functions.lua:735: attempt to index local 'jobTable' (a nil value)
1. unknown - gamemodes/militaryrp/gamemode/modules/base/sv_gamemode_functions.lua:735
ServerLog: [FAdmin] Michael Davis (STEAM_0:1:188741113) Spawned
[ERROR] gamemodes/militaryrp/gamemode/libraries/simplerr.lua:387: attempt to index local 'info' (a nil value)
1. b - gamemodes/militaryrp/gamemode/libraries/simplerr.lua:387
2. b - gamemodes/militaryrp/gamemode/libraries/fn.lua:84
3. errorNoHalt - gamemodes/militaryrp/gamemode/libraries/fn.lua:84
4. unknown - gamemodes/militaryrp/gamemode/modules/base/sv_gamemode_functions.lua:819
ServerLog: [FAdmin] Michael Davis (STEAM_0:1:184595113) is Authed
 
Discord d'entraide
Rejoignz-nous sur Discord