- Ошибка
-
В консоле пишет что все работает, а когда пишу в чат ни каких префиксов нету, в исходнике все настраивал
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.8.2 RUS
- Билд
-
ReHlds-3.4.0.641-dev_gcc
- ReGamedll
-
ReGameDLL version: 5.3.0.222-dev
- Версия Metamod
-
Metamod v1.21p37 2013/05/30 (5:13)
- Список метамодулей
-
description stat pend file vers src load unlod
[ 1] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 2] AMX Mod X RUN - amxmodx_mm_i386. v1.8.2 ini Start ANY
[ 3] Rechecker RUN - rechecker_mm_i38 v2.4 ini Chlvl ANY
[ 4] WHBlocker RUN - whblocker_mm_i38 v1.5.695 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] Revoice RUN - revoice_mm_i386. v0.1.0.3 ini Start Never
[ 7] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 8] MySQL RUN - mysql_amxx_i386. v1.8.2 pl2 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i3 v1.8.2 pl2 ANY ANY
[10] Ham Sandwich RUN - hamsandwich_amxx v1.8.2 pl2 ANY ANY
[11] CStrike RUN - cstrike_amxx_i38 v1.8.2-d pl2 ANY ANY
[12] CSX RUN - csx_amxx_i386.so v1.8.2 pl2 ANY ANY
[13] Engine RUN - engine_amxx_i386 v1.8.2 pl2 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.8.2 pl2 ANY ANY
[15] ReAimDetector RUN - reaimdetector_am v0.2.2 pl2 ANY Never
[16] ReAPI RUN - reapi_amxx_i386. v5.2.0.1 pl2 ANY Never
16 plugins, 16 running
- Список плагинов
-
name version author file status
[ 1] AMXBans: Core MA 1.6.9 Larte Team amxbans_core.am running
[ 2] AMXBans: Main MA 1.6.9 Larte Team amxbans_main.am running
[ 3] Anti Flood 1.8.2 AMXX Dev Team antiflood.amxx running
[ 4] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 5] Slots Reservation 1.8.2 AMXX Dev Team adminslots.amxx running
[ 6] Admin Votes 1.8.2 AMXX Dev Team adminvote.amxx running
[ 7] Admin Chat 1.8.M AMXX Dev Team adminchat.amxx running
[ 8] Commands Menu 1.8.2 AMXX Dev Team cmdmenu.amxx running
[ 9] Info. Messages 1.8.2 AMXX Dev Team imessage.amxx running
[ 10] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 11] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp running
[ 12] Maps Menu 1.8.2 AMXX Dev Team mapsmenu.amxx running
[ 13] Menus Front-End 1.8.2 AMXX Dev Team menufront.amxx running
[ 14] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx running
[ 15] Multi-Lingual System 1.8.2 AMXX Dev Team multilingual.am running
[ 16] NextMap 1.8.2 AMXX Dev Team nextmap.amxx stopped
[ 17] Pause Plugins 1.8.2 AMXX Dev Team pausecfg.amxx running
[ 18] Players Menu 1.8.M AMXX Dev Team plmenu.amxx running
[ 19] Restrict Weapons 1.8.2 AMXX Dev Team restmenu.amxx running
[ 20] Scrolling Message 1.8.2 AMXX Dev Team scrollmsg.amxx running
[ 21] Statsx Add-on 1.0.6 Radius statsx_addon.am running
[ 22] CS Stats Logging 1.8.2 AMXX Dev Team stats_logging.a running
[ 23] Stats Configuration 1.8.2 AMXX Dev Team statscfg.amxx running
[ 24] StatsX 1.8.2 AMXX Dev Team statsx.amxx running
[ 25] Teleport Menu 1.8.2 AMXX Dev Team telemenu.amxx running
[ 26] TimeLeft 1.8.2 AMXX Dev Team timeleft.amxx running
[ 27] Plugin Menu 1.8.2 AMXX Dev Team pluginmenu.amxx running
[ 28] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 29] [ReAPI] No Team Flash 1.0 ReHLDS Team noteamflash.amx running
[ 30] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
[ 31] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 32] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 33] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 34] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 35] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 36] Lite Translit 2.8 neygomon lite_translit.a running
[ 37] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 38] Gag Me 2.3.4 Radius gag_me.amxx running
[ 39] CSO Kill Sounds 1.0.7 Radius (based on cso_kill_sounds running
[ 40] Auto Team Balance Adva 1.5.1 Radius auto_team_balan running
[ 41] Radio Control 1.2.9 Radius radio_control.a running
[ 42] Damager Advanced 1.1.2 Radius (based on damager_advance running
[ 43] Hud Helper 1.0 gyxoBka HudHelper.amxx running
[ 44] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 45] AWP Restrictions 1.5.1 Radius awp_restriction running
[ 46] client_buy forward 0.1.1 ConnorMcLeod client_buy.amxx running
[ 47] Slay Losers 1.1.6 [email protected] slay_losers.amx running
[ 48] Block HudTextArgs 1.0 ConnorMcLeod hudTextArgsBloc running
[ 49] Auto-Restart 0.5 [email protected] auto-restart.am running
[ 50] Admin Free Look 1.3.2 Radius admin_free_look running
[ 51] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 52] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 53] Parachute 1.3 KRoT@L/JTP10181 amx_parachute.a running
[ 54] CS AFK Manager 1.0.6 (amx Freeman afk_manager_1-8 running
[ 55] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 56] AMXBans: Screens Gm 1.6 Larte Team amxbans_ssban.a running
56 plugins, 55 running
- Автор плагина
- Author: neugomon
- Версия плагина
- Name: Lite Translit Version: 2.8
- Исходный код
-
// *************************************************************************************//
// Плагин загружен с www.neugomon.ru //
// Автор: Neygomon [ https://neugomon.ru/members/1/ ] //
// Официальная тема поддержки: https://neugomon.ru/threads/110/ //
// При копировании материала ссылка на сайт 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 AES
enum _:
{
AES_ST_EXP,
AES_ST_LEVEL,
AES_ST_BONUSES,
AES_ST_NEXTEXP,
AES_ST_END
};
native aes_get_player_stats(id, data[4]);
native aes_get_level_name(lvlnum, level[], len, idLang = 0);
public plugin_natives()
set_native_filter("native_filter");
public native_filter(const name[], index, trap)
return !trap ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
#endif
new const g_chConvert[94 * 2 char] =
{
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
};
new bool:g_bUseRus[33];
#if defined STEAM
new bool:g_bIsSteam[33];
#endif
#if defined LT_PREFIXES
enum _:DATA
{
TYPE[2],
AUTH[32],
PREFIX[64]
};
new Array:g_aData, g_PlayerData[DATA];
new g_szPrefix[33][64];
#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_ALLCHAT
new g_bitAdmin;
#endif
new g_bitAlive;
public plugin_init()
{
#define VERSION "2.8"
register_plugin("Lite Translit", VERSION, "neygomon");
register_cvar("lt_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
register_clcmd("say /rus", "LangCtrlRus");
register_clcmd("say /eng", "LangCtrlEng");
register_clcmd("say", "HandlerSay");
register_clcmd("say_team", "HandlerSayTeam");
register_event("ResetHUD", "eResetHUD", "be");
register_event("DeathMsg", "eDeathMsg", "a", "1>0");
}
#if defined LT_PREFIXES
public plugin_cfg()
{
g_aData = ArrayCreate(DATA);
new buff[256], fp = fopen("addons/amxmodx/configs/lt_prefixes.ini", "rt");
if(!fp) return set_fail_state("File ^"addons/amxmodx/configs/lt_prefixes.ini^" not found");
while(!feof(fp))
{
fgets(fp, buff, charsmax(buff));
if(buff[0] && buff[0] != ';' && parse(buff, g_PlayerData[TYPE], charsmax(g_PlayerData[TYPE]), g_PlayerData[AUTH], charsmax(g_PlayerData[AUTH]), g_PlayerData[PREFIX], charsmax(g_PlayerData[PREFIX])))
ArrayPushArray(g_aData, g_PlayerData);
}
return fclose(fp);
}
#endif
public client_putinserver(id)
{
#if defined LT_PREFIXES
SearchClient(id);
#endif
#if defined DEF_RUS
g_bUseRus[id] = true;
#else
g_bUseRus[id] = false;
#endif
#if defined STEAM
g_bIsSteam[id] = is_user_steam(id) ? true : false;
#endif
#if defined ADMIN_ALLCHAT
if(get_user_flags(id) & ADMIN_CHAT) SetBit(g_bitAdmin, id);
else ResetBit(g_bitAdmin, id);
#endif
}
public client_disconnected(id) ResetBit(g_bitAlive, id);
public eResetHUD(id) SetBit(g_bitAlive, id);
public eDeathMsg() ResetBit(g_bitAlive, read_data(2));
public HandlerSay(id) return FormatMsg(id, false);
public HandlerSayTeam(id) return FormatMsg(id, true);
public LangCtrlRus(id)
{
if(g_bUseRus[id])
client_print(id, print_chat, "*** [LT] Русский язык УЖЕ включен! ***");
else
{
client_print(id, print_chat, "*** [LT] Русский язык активирован! ***");
g_bUseRus[id] = true;
client_cmd(id, "spk buttons/blip1.wav");
}
}
public LangCtrlEng(id)
{
if(!g_bUseRus[id])
client_print(id, print_chat, "*** [LT] Английский язык УЖЕ включен! ***");
else
{
client_print(id, print_chat, "*** [LT] Английский язык активирован! ***");
g_bUseRus[id] = false;
client_cmd(id, "spk buttons/blip1.wav");
}
}
FormatMsg(id, bool:IsTeam)
{
#define MAX_BYTES 180
static sMessage[MAX_BYTES], sConvertStr[charsmax(sMessage) * 2 + 1];
read_args(sMessage, charsmax(sMessage));
remove_quotes(sMessage); trim(sMessage);
if(sMessage[0] == EOS || sMessage[0] == '/')
return PLUGIN_HANDLED_MAIN;
#if defined ANTIFLOOD
static Float:fTimeFlood[33], Float:fGameTime, iFloodWarn[33];
if(fTimeFlood[id] > (fGameTime = get_gametime()))
{
if(++iFloodWarn[id] > 2)
{
client_print(id, print_chat, "*** [LT] Прекратите флудить! ***");
fTimeFlood[id] = fGameTime + AD_TIME + 3.0;
return PLUGIN_HANDLED;
}
}
else if(iFloodWarn[id]) iFloodWarn[id]--;
fTimeFlood[id] = fGameTime + AD_TIME;
#endif
static iLen, sTags[MAX_BYTES], idTeam, sTeam[16];
idTeam = get_user_team(id, sTeam, charsmax(sTeam));
switch(idTeam)
{
case 1: iLen = formatex(sTags, charsmax(sTags), "%s%s", GetBit(g_bitAlive, id) ? "^1" : "^1*^3Мертвый^1* ", IsTeam ? "^1[^3TT^1]" : "");
case 2: iLen = formatex(sTags, charsmax(sTags), "%s%s", GetBit(g_bitAlive, id) ? "^1" : "^1*^3Мертвый^1* ", IsTeam ? "^1[^3CT^1]" : "");
default:iLen = formatex(sTags, charsmax(sTags), "^1*^3Spec^1* ");
}
#if defined GREEN_MSG || (defined TAGS && !defined LT_PREFIXES)
static IsAccess; IsAccess = CheckFlags(id);
#endif
#if defined AES
static AESLvl[33][64], aStats[AES_ST_END];
aes_get_player_stats(id, aStats); aes_get_level_name(aStats[AES_ST_LEVEL], AESLvl[id], charsmax(AESLvl[]), LANG_SERVER);
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "^4[%s] ", AESLvl[id]);
#endif
#if defined STEAM
if(g_bIsSteam[id])
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "^1[^4Steam^1] ");
#endif
#if defined TAGS
#if defined LT_PREFIXES
if(g_szPrefix[id][0])
{
replace_all(g_szPrefix[id], charsmax(g_szPrefix[]), "!n", "^1");
replace_all(g_szPrefix[id], charsmax(g_szPrefix[]), "!t", "^3");
replace_all(g_szPrefix[id], charsmax(g_szPrefix[]), "!g", "^4");
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "%s ", g_szPrefix[id]);
}
#else
static const szAdminPrefix[][] = { "", "^1[^4Гл. Админ^1] ", "^1[^4Админ^1] ", "^1[^4VIP^1] " };
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "%s", szAdminPrefix[IsAccess]);
#endif
#endif
static sName[32];
get_user_name(id, sName, charsmax(sName));
#if defined GREEN_MSG
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "^3%s^1 : %s", sName, IsAccess ? "^4" : "");
#else
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, "^3%s^1 : ", sName);
#endif
if(g_bUseRus[id])
{
new nLen;
for(new n; sMessage[n] != EOS; n++)
{
if('!' <= sMessage[n] <= '~')
{
sConvertStr[nLen++] = g_chConvert{(sMessage[n] - '!') * 2};
if(g_chConvert{(sMessage[n] - '!') * 2 + 1} != EOS)
sConvertStr[nLen++] = g_chConvert{(sMessage[n] - '!') * 2 + 1};
}
else sConvertStr[nLen++] = sMessage[n];
}
sConvertStr[nLen] = EOS;
}
else sConvertStr = sMessage;
static iByteLimit; iByteLimit = MAX_BYTES;
while(iLen + strlen(sConvertStr) > MAX_BYTES)
sConvertStr[iByteLimit -= 10] = 0;
iLen += formatex(sTags[iLen], charsmax(sTags) - iLen, sConvertStr);
static players[32], pcount; get_players(players, pcount, "c");
switch(IsTeam)
{
case true:
{
for(new i; i < pcount; i++)
{
#if defined ADMIN_ALLCHAT
if(GetBit(g_bitAdmin, players[i]) || (GetBit(g_bitAlive, id) == GetBit(g_bitAlive, players[i]) && idTeam == get_user_team(players[i])))
#else
if(GetBit(g_bitAlive, id) == GetBit(g_bitAlive, players[i]) && idTeam == get_user_team(players[i]))
#endif
SendMsgChat(players[i], idTeam, sTags);
}
}
case false:
{
for(new i; i < pcount; i++)
#if defined DEFAULT_CS_CHAT
#if defined ADMIN_ALLCHAT
if(GetBit(g_bitAdmin, players[i]) || GetBit(g_bitAlive, id) == GetBit(g_bitAlive, players[i]))
#else
if(GetBit(g_bitAlive, id) == GetBit(g_bitAlive, players[i]))
#endif
SendMsgChat(players[i], idTeam, sTags);
#else
SendMsgChat(players[i], idTeam, sTags);
#endif
}
}
static sAuthId[25]; get_user_authid(id, sAuthId, charsmax(sAuthId));
log_message("^"%s<%d><%s><%s>^" %s ^"%s^"", sName, get_user_userid(id), sAuthId, sTeam, IsTeam ? "say_team" : "say" , sConvertStr);
return PLUGIN_HANDLED;
}
stock SendMsgChat(player, team, msg[])
{
switch(team)
{
case 1: client_print_color(player, print_team_red, msg);
case 2: client_print_color(player, print_team_blue, msg);
default:client_print_color(player, print_team_grey, msg);
}
}
stock SearchClient(const id)
{
for(new i; i < ArraySize(g_aData); i++)
{
ArrayGetArray(g_aData, i, g_PlayerData);
switch(g_PlayerData[TYPE])
{
case 'f':
{
if(get_user_flags(id) & read_flags(g_PlayerData[AUTH]))
return copy(g_szPrefix[id], charsmax(g_szPrefix[]), g_PlayerData[PREFIX]);
}
case 'i':
{
static sIP[16]; get_user_ip(id, sIP, charsmax(sIP), 1);
if(!strcmp(g_PlayerData[AUTH], sIP))
return copy(g_szPrefix[id], charsmax(g_szPrefix[]), g_PlayerData[PREFIX]);
}
case 's':
{
static sAuthid[25]; get_user_authid(id, sAuthid, charsmax(sAuthid));
if(!strcmp(g_PlayerData[AUTH], sAuthid))
return copy(g_szPrefix[id], charsmax(g_szPrefix[]), g_PlayerData[PREFIX]);
}
}
}
return g_szPrefix[id][0] = 0;
}
stock CheckFlags(id)
{
static iFlags; iFlags = get_user_flags(id);
if(iFlags & GL_ADMIN) return 1;
else if(iFlags & ADMIN) return 2;
else if(iFlags & VIP) return 3;
return 0;
}
stock bool:is_user_steam(id)
{
static dp_pointer;
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", id);
server_exec();
return (get_pcvar_num(dp_pointer) == 2) ? true : false;
}
return false;
}
В консоле пишет что все работает, а когда пишу в чат ни каких префиксов нету, в исходнике все настраивал
В этой теме было размещено решение! Перейти к решению.
Download all Attachments
-
12.1 KB Просмотры: 616
-
1.4 KB Просмотры: 571