Called when a player attemps to access or edit adminstrative settings.
Used in: VCMod Main, VCMod ELS addons.
Shared GM:VC_canEditAdminSettings(Entity ply, Boolean default)
1. Entity ply; Player
Player who is attempting to access admin privilages.
2. Boolean default; Default value
This is checked before calling this hook. This is determined by the administrator/core options section.
// This will allow only one specific person to access VCMod administrative options, place it inside of any named lua files (example: restrictVCModAdmin.lua) to garrysmod/lua/autorun/ directory (example: garrysmod/lua/autorun/restrictVCModAdmin.lua)
AddCSLuaFile() // This will force all players to download this file
local VCModcanEditOnly = "76561197989323181" // Example ID of VCMods creator, change it to your own 64bit SteamID
hook.Add("VC_canEditAdminSettings", "VC_canEditAdminSettings_RestrictToID", function(ply, default)
// Check if by default its allowed, if it is check if its the correct ID.
return VCModcanEditOnly == ply:SteamID64()
end)