Klaida: 5@B2K9 lite_translit plugine

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
procsLT
Jau po truputį tampa savu
Posts: 107
Joined: 2016 Dec 29 09:12
Skype: dj-paskuda

Klaida: 5@B2K9 lite_translit plugine

Post by procsLT »

Sveiki, gal kas turit idėju kodėl prie žmogaus niko kuris yra dead rašo: 5@B2K9 ?

lite_translit pluginas

Kodas:

Kodas: Select all

// *************************************************************************************//// Плагин загружен с  www.neugomon.ru                                                   //// Автор: Neygomon  [ https://neugomon.ru/members/1/ ]                                  //// Официальная тема поддержки: https://neugomon.ru/threads/110/                         //// При копировании материала ссылка на сайт http://www.neugomon.ru ОБЯЗАТЕЛЬНА!                //// *************************************************************************************//#include <amxmodx>#if AMXX_VERSION_NUM < 183     #include <colorchat>#endif /*    Спасибо PRoSToTeM@ за новый способ транслитерации*/ #define TAGS                // Теги в чате Гл. Админ | Админ | VIP  [ По умолчанию включен ]#if defined TAGS#define LT_PREFIXES     // Свои префиксы. Файл addons/amxmodx/configs/lt_prefixes.ini [ По умолчанию выключен ]#endif//#define STEAM             // Тег стим игрока [ По умолчанию выключен ]#define GREEN_MSG           // Зеленый цвет чата админов и випов [ По умолчанию выключен ]// #define AES              // Поддержка системы армейских званий - AES ( http://c-s.net.ua/forum/topic56564.html ) [ По умолчанию выключен ]// #define DEF_RUS          // Русский язык по умолчанию [ По умолчанию английский ]#define GL_ADMIN    ADMIN_RCON  // Флаг доступа для тега "Гл. Админ" в чате#define ADMIN       ADMIN_BAN   // Флаг доступа для тега "Админ" в чате#define VIP     ADMIN_LEVEL_H   // Флаг доступа для тега "VIP" в чате#define ANTIFLOOD           // Замена стандартного плагина antiflood.amxx [ По умолчанию выключен ]#define AD_TIME     0.75        // Время между сообщениями, когда сработает антифлуд система#define ADMIN_ALLCHAT           // Показывать весь чат админам [ По умолчанию включен ]//#define DEFAULT_CS_CHAT       // Cтандартный чат кс  [ По умолчанию выключен ]                        //Живые общаются только с живыми, мертвые с мертвыми. Админ видит весь чат если ADMIN_ALLCHAT#if defined AESenum _: &#123;     AES_ST_EXP,     AES_ST_LEVEL,     AES_ST_BONUSES,     AES_ST_NEXTEXP,     AES_ST_END&#125;;native aes_get_player_stats&#40;id, data&#91;4&#93;&#41;;native aes_get_level_name&#40;lvlnum, level&#91;&#93;, len, idLang = 0&#41;; public plugin_natives&#40;&#41;    set_native_filter&#40;"native_filter"&#41;;    public native_filter&#40;const name&#91;&#93;, index, trap&#41;    return !trap ? PLUGIN_HANDLED : PLUGIN_CONTINUE;#endif   new const g_chConvert&#91;94 * 2 char&#93; = &#123;    0x2100D0AD, 0x2300D0B6, 0x25003F00, 0xD18D2800, 0x29002A00, 0x2B00D0B1, 0x2D00D18E, 0x2E003000,    0x31003200, 0x33003400, 0x35003600, 0x37003800, 0x3900D096, 0xD0B6D091, 0x3D00D0AE, 0x2C002200,    0xD0A4D098, 0xD0A1D092, 0xD0A3D090, 0xD09FD0A0, 0xD0A8D09E, 0xD09BD094, 0xD0ACD0A2, 0xD0A9D097,    0xD099D09A, 0xD0ABD095, 0xD093D09C, 0xD0A6D0A7, 0xD09DD0AF, 0xD1855C00, 0xD18A3A00, 0x5F00D191,    0xD184D0B8, 0xD181D0B2, 0xD183D0B0, 0xD0BFD180, 0xD188D0BE, 0xD0BBD0B4, 0xD18CD182, 0xD189D0B7,    0xD0B9D0BA, 0xD18BD0B5, 0xD0B3D0BC, 0xD186D187, 0xD0BDD18F, 0xD0A52F00, 0xD0AAD081&#125;; new bool:g_bUseRus&#91;33&#93;;#if defined STEAMnew bool:g_bIsSteam&#91;33&#93;;#endif#if defined LT_PREFIXESenum _:DATA &#123;     TYPE&#91;2&#93;,     AUTH&#91;32&#93;,     PREFIX&#91;64&#93; &#125;;new Array:g_aData, g_PlayerData&#91;DATA&#93;;new g_szPrefix&#91;33&#93;&#91;64&#93;;#endif #define GetBit(%1,%2)       (%1 & (1 << (%2 & 31)))#define SetBit(%1,%2)       %1 |= (1 << (%2 & 31))#define ResetBit(%1,%2)     %1 &= ~(1 << (%2 & 31))#if defined ADMIN_ALLCHATnew g_bitAdmin;#endifnew g_bitAlive; public plugin_init&#40;&#41;&#123;#define VERSION "2.8"    register_plugin&#40;"Lite Translit", VERSION, "neygomon"&#41;;    register_cvar&#40;"lt_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY&#41;;        register_clcmd&#40;"say /rus", "LangCtrlRus"&#41;;    register_clcmd&#40;"say /eng", "LangCtrlEng"&#41;;        register_clcmd&#40;"say", "HandlerSay"&#41;;    register_clcmd&#40;"say_team", "HandlerSayTeam"&#41;;        register_event&#40;"ResetHUD", "eResetHUD", "be"&#41;;    register_event&#40;"DeathMsg", "eDeathMsg", "a", "1>0"&#41;;&#125; #if defined LT_PREFIXESpublic plugin_cfg&#40;&#41;&#123;    g_aData = ArrayCreate&#40;DATA&#41;;     new buff&#91;256&#93;, fp = fopen&#40;"addons/amxmodx/configs/lt_prefixes.ini", "rt"&#41;;    if&#40;!fp&#41; return set_fail_state&#40;"File ^"addons/amxmodx/configs/lt_prefixes.ini^" not found"&#41;;     while&#40;!feof&#40;fp&#41;&#41;    &#123;        fgets&#40;fp, buff, charsmax&#40;buff&#41;&#41;;        if&#40;buff&#91;0&#93; && buff&#91;0&#93; != ';' && parse&#40;buff, g_PlayerData&#91;TYPE&#93;, charsmax&#40;g_PlayerData&#91;TYPE&#93;&#41;, g_PlayerData&#91;AUTH&#93;, charsmax&#40;g_PlayerData&#91;AUTH&#93;&#41;, g_PlayerData&#91;PREFIX&#93;, charsmax&#40;g_PlayerData&#91;PREFIX&#93;&#41;&#41;&#41;            ArrayPushArray&#40;g_aData, g_PlayerData&#41;;    &#125;    return fclose&#40;fp&#41;;&#125;#endifpublic client_putinserver&#40;id&#41;&#123;#if defined LT_PREFIXES    SearchClient&#40;id&#41;;#endif  #if defined DEF_RUS    g_bUseRus&#91;id&#93; = true;#else    g_bUseRus&#91;id&#93; = false;#endif#if defined STEAM    g_bIsSteam&#91;id&#93; = is_user_steam&#40;id&#41; ? true : false;#endif#if defined ADMIN_ALLCHAT    if&#40;get_user_flags&#40;id&#41; & ADMIN_CHAT&#41; SetBit&#40;g_bitAdmin, id&#41;;    else ResetBit&#40;g_bitAdmin, id&#41;;#endif&#125; public client_disconnected&#40;id&#41;  ResetBit&#40;g_bitAlive, id&#41;;public eResetHUD&#40;id&#41;        SetBit&#40;g_bitAlive, id&#41;;public eDeathMsg&#40;&#41;      ResetBit&#40;g_bitAlive, read_data&#40;2&#41;&#41;;  public HandlerSay&#40;id&#41; return FormatMsg&#40;id, false&#41;;public HandlerSayTeam&#40;id&#41; return FormatMsg&#40;id, true&#41;; public LangCtrlRus&#40;id&#41;&#123;    if&#40;g_bUseRus&#91;id&#93;&#41;        client_print&#40;id, print_chat, "*** [LT] Русский язык УЖЕ включен! ***"&#41;;    else     &#123;        client_print&#40;id, print_chat, "*** [LT] Русский язык активирован! ***"&#41;;        g_bUseRus&#91;id&#93; = true;        client_cmd&#40;id, "spk buttons/blip1.wav"&#41;;    &#125;&#125; public LangCtrlEng&#40;id&#41;&#123;    if&#40;!g_bUseRus&#91;id&#93;&#41;        client_print&#40;id, print_chat, "*** [LT] Английский язык УЖЕ включен! ***"&#41;;    else    &#123;        client_print&#40;id, print_chat, "*** [LT] Английский язык активирован! ***"&#41;;        g_bUseRus&#91;id&#93; = false;        client_cmd&#40;id, "spk buttons/blip1.wav"&#41;;    &#125;&#125;  FormatMsg&#40;id, bool:IsTeam&#41;&#123;#define MAX_BYTES 180    static sMessage&#91;MAX_BYTES&#93;, sConvertStr&#91;charsmax&#40;sMessage&#41; * 2 + 1&#93;;     read_args&#40;sMessage, charsmax&#40;sMessage&#41;&#41;;    remove_quotes&#40;sMessage&#41;; trim&#40;sMessage&#41;;     if&#40;sMessage&#91;0&#93; == EOS || sMessage&#91;0&#93; == '/'&#41;        return PLUGIN_HANDLED_MAIN;#if defined ANTIFLOOD    static Float:fTimeFlood&#91;33&#93;, Float:fGameTime, iFloodWarn&#91;33&#93;;            if&#40;fTimeFlood&#91;id&#93; > &#40;fGameTime = get_gametime&#40;&#41;&#41;&#41;    &#123;        if&#40;++iFloodWarn&#91;id&#93; > 2&#41;        &#123;                       client_print&#40;id, print_chat, "*** [LT] Прекратите флудить! ***"&#41;;            fTimeFlood&#91;id&#93; = fGameTime + AD_TIME + 3.0;            return PLUGIN_HANDLED;        &#125;    &#125;    else if&#40;iFloodWarn&#91;id&#93;&#41; iFloodWarn&#91;id&#93;--;    fTimeFlood&#91;id&#93; = fGameTime + AD_TIME;#endif    static iLen, sTags&#91;MAX_BYTES&#93;, idTeam, sTeam&#91;16&#93;;    idTeam  = get_user_team&#40;id, sTeam, charsmax&#40;sTeam&#41;&#41;;     switch&#40;idTeam&#41;    &#123;        case 1: iLen = formatex&#40;sTags, charsmax&#40;sTags&#41;, "%s%s", GetBit&#40;g_bitAlive, id&#41; ? "^1" : "^1*^3Мертвый^1* ", IsTeam ? "^1[^3TT^1]" : ""&#41;;        case 2: iLen = formatex&#40;sTags, charsmax&#40;sTags&#41;, "%s%s", GetBit&#40;g_bitAlive, id&#41; ? "^1" : "^1*^3Мертвый^1* ", IsTeam ? "^1[^3CT^1]" : ""&#41;;        default:iLen = formatex&#40;sTags, charsmax&#40;sTags&#41;, "^1*^3Spec^1* "&#41;;    &#125;#if defined GREEN_MSG || (defined TAGS && !defined LT_PREFIXES)    static IsAccess; IsAccess = CheckFlags&#40;id&#41;;#endif  #if defined AES    static AESLvl&#91;33&#93;&#91;64&#93;, aStats&#91;AES_ST_END&#93;;    aes_get_player_stats&#40;id, aStats&#41;; aes_get_level_name&#40;aStats&#91;AES_ST_LEVEL&#93;, AESLvl&#91;id&#93;, charsmax&#40;AESLvl&#91;&#93;&#41;, LANG_SERVER&#41;;    iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, "^4[%s] ", AESLvl&#91;id&#93;&#41;;#endif#if defined STEAM    if&#40;g_bIsSteam&#91;id&#93;&#41;        iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, "^1[^4Steam^1] "&#41;;#endif#if defined TAGS        #if defined LT_PREFIXES    if&#40;g_szPrefix&#91;id&#93;&#91;0&#93;&#41;    &#123;        replace_all&#40;g_szPrefix&#91;id&#93;, charsmax&#40;g_szPrefix&#91;&#93;&#41;, "!n", "^1"&#41;;        replace_all&#40;g_szPrefix&#91;id&#93;, charsmax&#40;g_szPrefix&#91;&#93;&#41;, "!t", "^3"&#41;;        replace_all&#40;g_szPrefix&#91;id&#93;, charsmax&#40;g_szPrefix&#91;&#93;&#41;, "!g", "^4"&#41;;        iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, "%s ", g_szPrefix&#91;id&#93;&#41;;    &#125;       #else    static const szAdminPrefix&#91;&#93;&#91;&#93; = &#123; "", "^1[^4Гл. Админ^1] ", "^1[^4Админ^1] ", "^1[^4VIP^1] " &#125;;    iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, "%s", szAdminPrefix&#91;IsAccess&#93;&#41;;    #endif#endif      static sName&#91;32&#93;;    get_user_name&#40;id, sName, charsmax&#40;sName&#41;&#41;;#if defined GREEN_MSG    iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, "^3%s^1 :  %s", sName, IsAccess ? "^4" : ""&#41;;#else    iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, "^3%s^1 :  ", sName&#41;;#endif     if&#40;g_bUseRus&#91;id&#93;&#41;    &#123;        new nLen;        for&#40;new n; sMessage&#91;n&#93; != EOS; n++&#41;        &#123;            if&#40;'!' <= sMessage&#91;n&#93; <= '~'&#41;            &#123;                sConvertStr&#91;nLen++&#93; = g_chConvert&#123;&#40;sMessage&#91;n&#93; - '!'&#41; * 2&#125;;                if&#40;g_chConvert&#123;&#40;sMessage&#91;n&#93; - '!'&#41; * 2 + 1&#125; != EOS&#41;                    sConvertStr&#91;nLen++&#93; = g_chConvert&#123;&#40;sMessage&#91;n&#93; - '!'&#41; * 2 + 1&#125;;            &#125;             else sConvertStr&#91;nLen++&#93; = sMessage&#91;n&#93;;        &#125;        sConvertStr&#91;nLen&#93; = EOS;    &#125;     else sConvertStr = sMessage;        static iByteLimit; iByteLimit = MAX_BYTES;    while&#40;iLen + strlen&#40;sConvertStr&#41; > MAX_BYTES&#41;        sConvertStr&#91;iByteLimit -= 10&#93; = 0;        iLen += formatex&#40;sTags&#91;iLen&#93;, charsmax&#40;sTags&#41; - iLen, sConvertStr&#41;;        static players&#91;32&#93;, pcount; get_players&#40;players, pcount, "c"&#41;;    switch&#40;IsTeam&#41;    &#123;        case true:        &#123;            for&#40;new i; i < pcount; i++&#41;            &#123;#if defined ADMIN_ALLCHAT                               if&#40;GetBit&#40;g_bitAdmin, players&#91;i&#93;&#41; || &#40;GetBit&#40;g_bitAlive, id&#41; == GetBit&#40;g_bitAlive, players&#91;i&#93;&#41; && idTeam == get_user_team&#40;players&#91;i&#93;&#41;&#41;&#41;#else                if&#40;GetBit&#40;g_bitAlive, id&#41; == GetBit&#40;g_bitAlive, players&#91;i&#93;&#41; && idTeam == get_user_team&#40;players&#91;i&#93;&#41;&#41;#endif                    SendMsgChat&#40;players&#91;i&#93;, idTeam, sTags&#41;;            &#125;                                       &#125;        case false:        &#123;               for&#40;new i; i < pcount; i++&#41;#if defined DEFAULT_CS_CHAT             #if defined ADMIN_ALLCHAT                           if&#40;GetBit&#40;g_bitAdmin, players&#91;i&#93;&#41; || GetBit&#40;g_bitAlive, id&#41; == GetBit&#40;g_bitAlive, players&#91;i&#93;&#41;&#41;    #else                if&#40;GetBit&#40;g_bitAlive, id&#41; == GetBit&#40;g_bitAlive, players&#91;i&#93;&#41;&#41;    #endif                                  SendMsgChat&#40;players&#91;i&#93;, idTeam, sTags&#41;;#else                SendMsgChat&#40;players&#91;i&#93;, idTeam, sTags&#41;;#endif          &#125;    &#125;    static sAuthId&#91;25&#93;; get_user_authid&#40;id, sAuthId, charsmax&#40;sAuthId&#41;&#41;;    log_message&#40;"^"%s<%d><%s><%s>^" %s ^"%s^"", sName, get_user_userid&#40;id&#41;, sAuthId, sTeam, IsTeam ? "say_team" : "say" , sConvertStr&#41;;     return PLUGIN_HANDLED;&#125; stock SendMsgChat&#40;player, team, msg&#91;&#93;&#41;&#123;    switch&#40;team&#41;    &#123;        case 1: client_print_color&#40;player, print_team_red, msg&#41;;        case 2: client_print_color&#40;player, print_team_blue, msg&#41;;        default:client_print_color&#40;player, print_team_grey, msg&#41;;    &#125;&#125; stock SearchClient&#40;const id&#41;&#123;    for&#40;new i; i < ArraySize&#40;g_aData&#41;; i++&#41;    &#123;        ArrayGetArray&#40;g_aData, i, g_PlayerData&#41;;        switch&#40;g_PlayerData&#91;TYPE&#93;&#41;        &#123;            case 'f':             &#123;                if&#40;get_user_flags&#40;id&#41; & read_flags&#40;g_PlayerData&#91;AUTH&#93;&#41;&#41;                    return copy&#40;g_szPrefix&#91;id&#93;, charsmax&#40;g_szPrefix&#91;&#93;&#41;, g_PlayerData&#91;PREFIX&#93;&#41;;            &#125;               case 'i':             &#123;                static sIP&#91;16&#93;; get_user_ip&#40;id, sIP, charsmax&#40;sIP&#41;, 1&#41;;                if&#40;!strcmp&#40;g_PlayerData&#91;AUTH&#93;, sIP&#41;&#41;                     return copy&#40;g_szPrefix&#91;id&#93;, charsmax&#40;g_szPrefix&#91;&#93;&#41;, g_PlayerData&#91;PREFIX&#93;&#41;;            &#125;                   case 's':             &#123;                static sAuthid&#91;25&#93;; get_user_authid&#40;id, sAuthid, charsmax&#40;sAuthid&#41;&#41;;                if&#40;!strcmp&#40;g_PlayerData&#91;AUTH&#93;, sAuthid&#41;&#41;                     return copy&#40;g_szPrefix&#91;id&#93;, charsmax&#40;g_szPrefix&#91;&#93;&#41;, g_PlayerData&#91;PREFIX&#93;&#41;;            &#125;               &#125;    &#125;    return g_szPrefix&#91;id&#93;&#91;0&#93; = 0;&#125; stock CheckFlags&#40;id&#41;&#123;    static iFlags; iFlags = get_user_flags&#40;id&#41;;    if&#40;iFlags & GL_ADMIN&#41;   return 1;    else if&#40;iFlags & ADMIN&#41; return 2;    else if&#40;iFlags & VIP&#41;   return 3;    return 0;&#125; stock bool:is_user_steam&#40;id&#41;&#123;    static dp_pointer;    if&#40;dp_pointer || &#40;dp_pointer = get_cvar_pointer&#40;"dp_r_id_provider"&#41;&#41;&#41;    &#123;        server_cmd&#40;"dp_clientinfo %d", id&#41;;        server_exec&#40;&#41;;        return &#40;get_pcvar_num&#40;dp_pointer&#41; == 2&#41; ? true : false;    &#125;    return false;&#125;
-- 2018 Geg 21 20:56 --

Sutvarkiau.

Jeigu kam nors bus toks erroras , tai vietoje Мертвый žodžio irašykit kita :) Tarkim dead.
Attachments
Untitled.jpg
Image
Counter-strike 1.6 serveriai: http://www.procs.lt
Cs 1.6 atsisiūntimo nuoroda - http://counter-strike-download.procs.lt

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests