Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

kzug2a

Użytkownik
  • Postów

    4
  • Dołączył

  • Ostatnia wizyta

Odpowiedzi opublikowane przez kzug2a

  1. Hello i have this plugins and found some bugs. First one, the !goldtag command is working, but it dont set in the player nickname. And second bug is, this plugin wont give 100% armor, defuse kit, 1 molotov to players who have "go.evolion.ro" in their nicknames. Can someone help me please?

     

    #include <sourcemod>
    #include <sdktools>
    #include <cstrike>
    #include <clientprefs>
     
    Handle g_hMyCookie;
    int gloves[MAXPLAYERS+1];
     
    public Plugin myinfo =
    {
        name = "GoldMember & PlayerTagsMenu",
        description = "Define player tags",
        author = "shoc",
        version = "1.0",
        url = "evolion.ro"
    }
     
    public void OnPluginStart()
    {
        g_hMyCookie = RegClientCookie("myplugin_mycookie", "MyPlugin MyCookie", CookieAccess_Protected);
        RegConsoleCmd("sm_goldtag", menutag);
        HookEvent("round_start", EventRoundStart, EventHookMode_PostNoCopy);
    }
     
    public void OnClientCookiesCached(int client)
    {
        OnClientPostAdminCheck(client);
    }
     
    public void OnClientPostAdminCheck(int client)
    {
        char buffer[12];
        GetClientCookie(client, g_hMyCookie, buffer, sizeof(buffer));
        gloves[client] = StringToInt(buffer);
    }
     
    MyFunction(client)
    {
        new Handle:menu = CreateMenu(tagmenu);
        SetMenuTitle(menu, "Custom Tag Menu");
     
        AddMenuItem(menu, "none", "No TaG");
        AddMenuItem(menu, "sniper", "sNipeR ❖");
        AddMenuItem(menu, "wtfcs", "GoldMember ❖");
        AddMenuItem(menu, "saprk", "spArk ❖");
        AddMenuItem(menu, "cioara", "CiΦaRa ❖");
        AddMenuItem(menu, "moet", "mOeTTT ❖");
        AddMenuItem(menu, "destroyer", "DestroyeR ❖");
        AddMenuItem(menu, "destroyer", "NΦ ЅCΦP3 ❖");
        AddMenuItem(menu, "destroyer", "NΦΦB ❖");
        AddMenuItem(menu, "destroyer", "milmΦi ❖");
        AddMenuItem(menu, "destroyer", "C4mpeR ❖");	
        DisplayMenu(menu, client, MENU_TIME_FOREVER);
       
    }
     
    public EventRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
    {
        char sBuffer[12];
        PrintToChatAll("★★★\x04Add \GO.EVOLION.RO \x04in steam name to get acces at \x07GoldMember: jump effect \x04and \x07!goldtag");
        for (int client = 1; client <= MaxClients; client++)
        {
            if(IsClientValid(client))
            {
                int choosed;
                GetClientCookie(client,g_hMyCookie,sBuffer,sizeof(sBuffer))
                choosed = StringToInt(sBuffer);
                if (IsClientInGame(client)&&(IsClientValid(client)))
                {
                    if(choosed == 0)
                    {
                        CS_SetClientClanTag(client, " ");
                    }
                    else
                    if(choosed == 1)
                    {
                        CS_SetClientClanTag(client, "sNipeR ❖");    
                    }
                    else
                    if(choosed == 2)
                    {
                        CS_SetClientClanTag(client, "GoldMember ❖");
                    }
                    else
                    if(choosed == 3)
                    {
                        CS_SetClientClanTag(client, "spArk ❖");
                    }
                    else
                    if(choosed == 4)
                    {
                        CS_SetClientClanTag(client, "CiΦaRa ❖");
                    }
                    else
                    if(choosed == 5)
                    {
                        CS_SetClientClanTag(client, "mOeTTT ❖");
                    }
                    else
                    if(choosed == 6)
                    {
                        CS_SetClientClanTag(client, "DestroyeR ❖");
                    }
                    else
                    if(choosed == 7)
                    {
                        CS_SetClientClanTag(client, "NΦ ЅCΦP3 ❖");
                    }				
                    else
                    if(choosed == 8)
                    {
                        CS_SetClientClanTag(client, "NΦΦB ❖");
                    }
                    else
                    if(choosed == 9)
                    {
                        CS_SetClientClanTag(client, "milmΦi ❖");
                    }
                    else
                    if(choosed == 10)
                    {
                        CS_SetClientClanTag(client, "C4mpeR ❖");
                    }						
                }
            }
        }
    }
     
    stock bool IsClientValid(int client)
    {
        if (client >= 1 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client) && !IsFakeClient(client))
            return true;
        return false;
    }
     
    bool IsNameGold(int iClient)
    {
        decl String:ClientName[MAX_NAME_LENGTH], String:sLine[128];
     
        GetClientName(iClient, ClientName, sizeof(ClientName));
     
        if(StrContains(ClientName, "GO.EVOLION.RO", false) != -1)
        {
            return true;
        }
        else
        if (StrContains(ClientName, sLine, false) != -1)
        {
            return false;
        }
     
        return true;
    }
     
    public Action menutag(client, args)
    {
        if((IsNameGold(client)) && !(GetUserFlagBits(client) & ADMFLAG_RESERVATION))
        {
            MyFunction(client);
        }
        else
        if(GetUserFlagBits(client) & ADMFLAG_RESERVATION)
        {
            PrintToChat(client, "\x07❖❖❖\x04Pentru un joc mai clar fata de jucatori cei cu Admin si VIP trebuie sa isi pastreze tag-ul original.");
        }
        else
        {
            PrintToChat(client, "\x07❖❖❖\x04 Trebuie sa adaugi GO.EVOLION.RO in nume pentru a avea acces la TAG CUSTOM");
        }
    }
     
    public tagmenu(Handle:menu, MenuAction:action, param1, param2)
    {
        switch (action)
        {
            case MenuAction_Select:
            {
                decl String:sBuffer[12];
                int i = 9;
                //param1 is client, param2 is item
                switch(param2)
                {
                    //new String:item[64];
                    //GetMenuItem(menu, param2, item, sizeof(item));
     
                    case 0:
                    {
                        i=0;
                        CS_SetClientClanTag(param1, " ");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);                       
                    }
                    case 1:
                    {
                        i=1;
                        CS_SetClientClanTag(param1, "sNipeR ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));        
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 2:
                    {
                        i=2;
                        CS_SetClientClanTag(param1, "GoldMember ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 3:
                    {
                        i=3;
                        CS_SetClientClanTag(param1, "spArk ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 4:
                    {
                        i=4;
                        CS_SetClientClanTag(param1, "CiΦaRa ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 5:
                    {
                        i=5;
                        CS_SetClientClanTag(param1, "mOeTTT ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 6:
                    {
                        i=6;
                        CS_SetClientClanTag(param1, "DestroyeR ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 7:
                    {
                        i=7;
                        CS_SetClientClanTag(param1, "NΦ ЅCΦP3 ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 8:
                    {
                        i=8;
                        CS_SetClientClanTag(param1, "NΦΦB ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 9:
                    {
                        i=9;
                        CS_SetClientClanTag(param1, "milmΦi ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }
                    case 10:
                    {
                        i=10;
                        CS_SetClientClanTag(param1, "C4mpeR ❖");
                        IntToString(i, sBuffer, sizeof(sBuffer));
                        SetClientCookie(param1, g_hMyCookie, sBuffer);
                    }					
                }
            }
     
            case MenuAction_End:
                CloseHandle(menu);
     
        }
        return 0;
    }

     

×
×
  • Dodaj nową pozycję...