[CSGO] Rezolvare Plugin

Descărcări de pluginuri și discuții despre acestea.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
[Royal]Fido
Membru nou
Membru nou
Posts: 3
Joined: 02 Sep 2019, 11:15
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Has thanked: 1 time

04 Jun 2021, 18:49

Salut, daca am gresit sectiunea, sau daca era un model anume de urmat pentru asta, imi cer scuze din avans, insa am cautat si nu am gasit.

Am si eu o problema, la compilarea unui plugin de !admins (care arata adminii in chat). Imi da 7 erori de tag mismatch. Aveti vreo rezolvare?
Sursa:
| Afiseaza codul
#pragma semicolon 1

#define DEBUG

#include <sourcemod>
#include <sdktools>
#include <colors>

#pragma newdecls required

public Plugin myinfo = 
{
    name = "Admini online",
    author = "zLow",
    description = "Arata admini online",
    version = "",
    url = ""
};

public void OnPluginStart()
{
    RegConsoleCmd("sm_admins", Command_ShowAdminsOnline);
    RegConsoleCmd("sm_admini", Command_ShowAdminsOnline);
    RegConsoleCmd("sm_adminionline", Command_ShowAdminsOnline);
}

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 Owners: \x01 %N", client );                        
                    }                 
                    else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM1)
                    {                        
                        PrintToChat(client, "\x01★\x08 Managers: \x01 %N", client );                        
                    }
                    else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM2)
                    {
                        PrintToChat(client, "\x01★\x07 Admins: \x01 %N", client );                        
                    }
                    else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM3)
                    {
                        PrintToChat(client, "\x01★\x04 Super-Moderators: \x01 %N", client );                        
                    }
                    else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM4)
                    {
                        PrintToChat(client, "\x01★\x05 Moderators: \x01 %N", client );                        
                    }
                    else if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_CUSTOM5)
                    {
                        PrintToChat(client, "\x01★\x06 Helpers: \x01 %N", client );                        
                    }
                }
            }
        }
    }
}
Post Reply

Return to “Pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest