Hello! I tried to edit a !admins plugins , but i failded again. What i need to do? I wanted to make my own list , like:
sm_admins
★ Founders: AdminName1 , AdminName2
★ Owners: AdminName1 , AdminName2
★ Mods: AdminName1 , AdminName2
★ Admins: AdminName1 , AdminName2
★ Helpers: AdminName1 , AdminName2
sm_vips
{color}VIPs: VipName1 , VipName2
Surse:
PHP Code:
#pragma semicolon 1
#define DEBUG
#include <sourcemod>
#include <sdktools>
#include <colors>
#pragma newdecls required
public Plugin myinfo =
{
name = "[CSGO] List of Online Admins",
author = "",
description = "Reply to sm_admins command the name of online admin",
version = "",
url = ""
};
public void OnPluginStart()
{
RegConsoleCmd("sm_admins", Command_ShowAdminsOnline);
RegConsoleCmd("sm_vips", Command_ShowVipsOnline);
}
public Action Command_ShowAdminsOnline(int client, int args)
{
for (int index = 1; index < MaxClients; index++)
{
if(IsClientInGame(index))
{
AdminId ClientAccess = GetUserAdmin(index);
if(ClientAccess)
{
int AdminGroupsCount = GetAdminGroupCount(ClientAccess);
for (int x = 0; x < AdminGroupsCount; x++)
{
char GroupName[32];
if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_ROOT)
{
PrintToChat(client, "\x01★\x02 Founders: \x01 %N", client );
}
else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_UNBAN)
{
PrintToChat(client, "\x01★\x07 Owners: \x01 %N", client );
}
else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM3)
{
PrintToChat(client, "\x01★\x04 Mods: \x01 %N", client );
}
else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_BAN)
{
PrintToChat(client, "\x01★\x05 Admins: \x01 %N", client );
}
else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_GENERIC)
{
PrintToChat(client, "\x01★\x06 Helpers: \x01 %N", client );
}
}
}
}
}
}
public Action Command_ShowVipsOnline(int client, int args)
{
for (int index = 1; index < MaxClients; index++)
{
if(IsClientInGame(index))
{
AdminId ClientAccess = GetUserAdmin(index);
if(ClientAccess)
{
int AdminGroupsCount = GetAdminGroupCount(ClientAccess);
for (int x = 0; x < AdminGroupsCount; x++)
{
char GroupName[32];
if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM6)
{
PrintToChat(client, "\x01★\x10 VIPs: \x01 %N", client );
}
}
}
}
}
}
On servers looks like this:
★ Founders: PorcusorulMagic
★ Founders: PorcusorulMagic
★ Founders: PorcusorulMagic
★ VIPs: PorcusorulMagic
★ VIPs: PorcusorulMagic
★ VIPs: PorcusorulMagic
__________________