View Single Post
AePT
Member
Join Date: Jan 2016
Old 01-03-2021 , 09:31   Re: What did the FindAdminByIdentity?
Reply With Quote #2

With this function you can find an administrator through SteamId, for example...

PHP Code:
#include <sourcemod>

public Plugin myinfo =
{
    
name "Check Admin",
    
author "sekm",
    
description "",
    
version "1.0",
    
url "https://steamcommunity.com/id/h5r/"
};

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_checkadmin"Command_CheckAdmin);
}

public 
Action Command_CheckAdmin(int iClientint iArgs)
{
    
AdminId iAdmin FindAdminByIdentity("steam""STEAM_0:0:1347337");

    if (
iAdmin != INVALID_ADMIN_ID)
    {
         
PrintToChatAll("SteamId: STEAM_0:0:1347337 has admin");
    }
    else
    {
         
PrintToChatAll("SteamId: STEAM_0:0:1347337 has not a admin");
    }

Greetings!

Last edited by AePT; 01-03-2021 at 23:28.
AePT is offline