- Ошибка
-
Нету
- ОС
- Linux
- Amx Mod X
-
1.9.0.5263
- Билд
-
3.7.0.695-dev
- ReGamedll
-
5.17.0.466-dev
- Версия Metamod
-
Metamod v1.21p37
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 2] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 4] ProcessCmds RUN - processcmds_mm_i v1.1.6 ini Start Never
[ 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] WHBlocker RUN - whblocker_mm_i38 v1.5.697 ini Chlvl ANY
[ 8] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl3 ANY ANY
[ 9] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[10] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl3 ANY ANY
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl3 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl3 ANY ANY
[13] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl3 ANY ANY
[14] Engine RUN - engine_amxx_i386 v1.9.0.5 pl3 ANY ANY
[15] ReAimDetector RUN - reaimdetector_am v0.2.2 pl3 ANY Never
[16] ReAPI RUN - reapi_amxx_i386. v5.14.0. pl3 ANY Never
- Список плагинов
-
[ 1] FreshBans 1.3.8b kanagava fresh_bans.amxx running
[ 2] Admin Loader 2.9 neygomon admin_loader.am running
[ 3] Admin Commands 1.9.0.5263 AMXX Dev Team admincmd.amxx running
[ 4] Admin Votes 1.9.0.5263 AMXX Dev Team adminvote.amxx running
[ 5] Commands Menu 1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 6] Info. Messages 1.9.0.5263 AMXX Dev Team imessage.amxx running
[ 7] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx running
[ 8] Menus Front-End 1.9.0.5263 AMXX Dev Team menufront.amxx running
[ 9] CS Misc. Stats 1.9.0.5263 AMXX Dev Team miscstats.amxx running
[ 10] Multi-Lingual System 1.9.0.5263 AMXX Dev Team multilingual.am running
[ 11] Pause Plugins 1.9.0.5263 AMXX Dev Team pausecfg.amxx running
[ 12] Players Menu 1.9.0.5263 AMXX Dev Team plmenu.amxx running
[ 13] Restrict Weapons 1.9.0.5263 AMXX Dev Team restmenu.amxx running
[ 14] Scrolling Message 1.9.0.5263 AMXX Dev Team scrollmsg.amxx running
[ 15] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 16] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am running
[ 17] CS Stats Logging 1.9.0.5263 AMXX Dev Team stats_logging.a running
[ 18] Stats Configuration 1.9.0.5263 AMXX Dev Team statscfg.amxx running
[ 19] StatsX 1.9.0.5263 AMXX Dev Team statsx.amxx running
[ 20] Teleport Menu 1.9.0.5263 AMXX Dev Team telemenu.amxx running
[ 21] TimeLeft 1.9.0.5263 AMXX Dev Team timeleft.amxx running
[ 22] Plugin Menu 1.9.0.5263 AMXX Dev Team pluginmenu.amxx running
[ 23] Admin ESP 1.5b_mini KoST admin_esp_mini. running
[ 24] High Ping Kicker 1.0 Shadow/Bo0m! amx_hpk.amxx running
[ 25] Admin Free Look 2.0 Jim admin_freelook. running
[ 26] Play or Be Kicked 1.5.243 Brad Jones pbk.amxx running
[ 27] RockTheVote 1.8 DA rockthevote_cus running
[ 28] UFPS VoteBan 1.5 UFPS.Team voteban.amxx running
[ 29] mute menu 1.0 cheap_suit mutemenu.amxx running
[ 30] Info Rank 1.0/1 connor info_rank.amxx running
[ 31] Block HudTextArgs 1.0 ConnorMcLeod hudTextArgsBloc running
[ 32] Damager 2.0/1 Prayer edited My damager.amxx paused
[ 33] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx running
[ 34] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 35] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 36] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 37] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 38] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 39] Block Pickup Gold 0.1 Vaqtincha BlockPickupGold running
[ 40] Reset Score 1.0 Silenttt resetscore.amxx running
[ 41] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 42] GameName Changer 1.0 neugomon gamename.amxx running
[ 43] Rank1 -> VIP 0.0.1 ConnorMcLeod vip_rank.amxx running
[ 44] [182] Parachute RBS 17.12.12 KRoT@L/JTP10181 parachute_rbs.a running
[ 45] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 46] Lite Translit 2.8 neygomon lite_translit.a running
[ 47] VIPKA 0.1 VATAJAT vipka.amxx running
[ 48] Menu 1.0 WaT_1 menu.amxx running
[ 49] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 50] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp running
[ 51] steam_menu 2.5 CaNiBaL steamenu.amxx paused
[ 52] Night VIPs Private Racoon, Leo_[BH] night_vips.amxx running
[ 53] Killer ScreenFade 0.0.5 Vaqtincha reapi_killer_sc running
[ 54] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 55] Paint Marker 2.0.0 twisterniq paint_marker.am running
[ 56] Paint Marker: Default 1.0.1 twisterniq paint_marker_de running
[ 57] Game Messages & Sounds 3.0 OciXCrom crx_gamemessage running
[ 58] Style C4 Timer 3.1 OciXCrom crx_c4timer.amx running
[ 59] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 60] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 61] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am debug
[ 62] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 63] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 64] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri running
[ 65] AES Bonus: Flags 0.2 Sonyx aes_bonus_flags running
65 plugins, 63 running
- Автор плагина
- OciXCrom
- Версия плагина
- 3.0
- Исходный код
-
#include <amxmodx>
#include <amxmisc>
#include <cromchat>
#if AMXX_VERSION_NUM < 183
#include <dhudmessage>
#endif
new const PLUGIN_VERSION[] = "3.0"
new const Float:POS_DEFAULT = 9.99
new const SYM_SUBSTRING[] = "%s"
new const SYM_NEWLINE[] = "%n"
new const REP_NEWLINE_HUD[] = "^n"
new const REP_NEWLINE_CENTER[] = "^r"
enum _:Cvars
{
CVAR_XPOS,
CVAR_YPOS,
CVAR_EFFECTS,
CVAR_FXTIME,
CVAR_HOLDTIME,
CVAR_FADEINTIME,
CVAR_FADEOUTTIME
}
enum _:Values
{
VALUE_EFFECTS,
Float:VALUE_FXTIME,
Float:VALUE_HOLDTIME,
Float:VALUE_FADEINTIME,
Float:VALUE_FADEOUTTIME
}
enum _:Messages
{
MSG_NEW[128],
Types:MSG_TYPE,
MSG_COLOR[3],
Float:MSG_POSITION[2]
}
enum _:Types
{
TYPE_CHAT,
TYPE_CENTER,
TYPE_HUD,
TYPE_DHUD
}
new g_eCvars[Cvars],
g_eValues[Values],
Array:g_aMessages,
Trie:g_tMessages,
Trie:g_tSounds,
g_iMessagesNum
public plugin_init()
{
register_plugin("Game Messages & Sounds Manager", PLUGIN_VERSION, "OciXCrom")
register_cvar("WinMessages", PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
register_message(get_user_msgid("TextMsg"), "OnTextMsg")
register_message(get_user_msgid("SendAudio"), "OnSendAudio")
g_eCvars[CVAR_XPOS] = register_cvar("gmsm_hud_xpos", "-1.0")
g_eCvars[CVAR_YPOS] = register_cvar("gmsm_hud_ypos", "0.10")
g_eCvars[CVAR_EFFECTS] = register_cvar("gmsm_hud_effects", "0")
g_eCvars[CVAR_FXTIME] = register_cvar("gmsm_hud_fxtime", "2.0")
g_eCvars[CVAR_HOLDTIME] = register_cvar("gmsm_hud_holdtime", "5.0")
g_eCvars[CVAR_FADEINTIME] = register_cvar("gmsm_hud_fadeintime", "0.5")
g_eCvars[CVAR_FADEOUTTIME] = register_cvar("gmsm_hud_fadeouttime", "1.0")
}
public plugin_precache()
{
g_aMessages = ArrayCreate(Messages)
g_tMessages = TrieCreate()
g_tSounds = TrieCreate()
ReadFile()
}
public plugin_end()
{
ArrayDestroy(g_aMessages)
TrieDestroy(g_tMessages)
TrieDestroy(g_tSounds)
}
public plugin_cfg()
{
new Float:fPosition[2]
fPosition[0] = get_pcvar_float(g_eCvars[CVAR_XPOS])
fPosition[1] = get_pcvar_float(g_eCvars[CVAR_YPOS])
for(new eMessage[Messages], i, j; i < g_iMessagesNum; i++)
{
ArrayGetArray(g_aMessages, i, eMessage)
for(j = 0; j < 2; j++)
{
if(eMessage[MSG_POSITION][j] == POS_DEFAULT)
eMessage[MSG_POSITION][j] = _:fPosition[j]
}
ArraySetArray(g_aMessages, i, eMessage)
}
g_eValues[VALUE_EFFECTS] = get_pcvar_num(g_eCvars[CVAR_EFFECTS])
g_eValues[VALUE_FXTIME] = _:get_pcvar_float(g_eCvars[CVAR_FXTIME])
g_eValues[VALUE_HOLDTIME] = _:get_pcvar_float(g_eCvars[CVAR_HOLDTIME])
g_eValues[VALUE_FADEINTIME] = _:get_pcvar_float(g_eCvars[CVAR_FADEINTIME])
g_eValues[VALUE_FADEOUTTIME] = _:get_pcvar_float(g_eCvars[CVAR_FADEOUTTIME])
}
ReadFile()
{
new szFilename[256]
get_configsdir(szFilename, charsmax(szFilename))
add(szFilename, charsmax(szFilename), "/GameMessages.ini")
new iFilePointer = fopen(szFilename, "rt")
if(iFilePointer)
{
new eMessage[Messages], szColors[3][4], szCoordinates[2][6], szData[256], szSound[128], szMessage[64], szFullColor[12], szPosition[12], szType[4], i
while(!feof(iFilePointer))
{
fgets(iFilePointer, szData, charsmax(szData))
trim(szData)
switch(szData[0])
{
case EOS, '#', ';': continue
case '%':
{
parse(szData, szMessage, charsmax(szMessage), szSound, charsmax(szSound))
TrieSetString(g_tSounds, szMessage, szSound)
if(szSound[0])
precache_sound(szSound)
szSound[0] = EOS
}
default:
{
if(g_iMessagesNum)
{
szFullColor[0] = EOS
szPosition[0] = EOS
eMessage[MSG_NEW][0] = EOS
for(i = 0; i < 3; i++)
{
szColors[i][0] = EOS
eMessage[MSG_COLOR][i] = 0
}
for(i = 0; i < 2; i++)
{
szCoordinates[i][0] = EOS
eMessage[MSG_POSITION][i] = _:POS_DEFAULT
}
}
parse(szData, szMessage, charsmax(szMessage), eMessage[MSG_NEW], charsmax(eMessage[MSG_NEW]), szType, charsmax(szType), szFullColor, charsmax(szFullColor), szPosition, charsmax(szPosition))
format(szMessage, charsmax(szMessage), "#%s", szMessage)
TrieSetCell(g_tMessages, szMessage, g_iMessagesNum++)
switch(szType[2])
{
case 'A', 'a': eMessage[MSG_TYPE] = _:TYPE_CHAT
case 'N', 'n': eMessage[MSG_TYPE] = _:TYPE_CENTER
case 'D', 'd': eMessage[MSG_TYPE] = _:TYPE_HUD
case 'U', 'u': eMessage[MSG_TYPE] = _:TYPE_DHUD
}
if(_:eMessage[MSG_TYPE] == TYPE_HUD || _:eMessage[MSG_TYPE] == TYPE_DHUD)
{
if(szFullColor[0])
{
parse(szFullColor, szColors[0], charsmax(szColors[]), szColors[1], charsmax(szColors[]), szColors[2], charsmax(szColors[]))
for(i = 0; i < 3; i++)
eMessage[MSG_COLOR][i] = str_to_num(szColors[i])
}
if(szPosition[0])
{
parse(szPosition, szCoordinates[0], charsmax(szCoordinates[]), szCoordinates[1], charsmax(szCoordinates[]))
for(i = 0; i < 2; i++)
eMessage[MSG_POSITION][i] = _:str_to_float(szCoordinates[i])
}
}
ArrayPushArray(g_aMessages, eMessage)
}
}
}
fclose(iFilePointer)
}
}
public OnTextMsg(iMessage, iDest, id)
{
static szMessage[64]
get_msg_arg_string(2, szMessage, charsmax(szMessage))
if(TrieKeyExists(g_tMessages, szMessage))
{
new eMessage[Messages], iMessage
TrieGetCell(g_tMessages, szMessage, iMessage)
ArrayGetArray(g_aMessages, iMessage, eMessage)
new iArgs = get_msg_args()
if(iArgs > 2)
{
for(new szSubString[32], i = 2; i < iArgs; i++)
{
get_msg_arg_string(i + 1, szSubString, charsmax(szSubString))
replace(eMessage[MSG_NEW], charsmax(eMessage[MSG_NEW]), SYM_SUBSTRING, szSubString)
}
}
replace_all(eMessage[MSG_NEW], charsmax(eMessage[MSG_NEW]), SYM_SUBSTRING, "")
switch(eMessage[MSG_TYPE])
{
case TYPE_CHAT: CC_SendMessage(id, eMessage[MSG_NEW])
case TYPE_CENTER:
{
replace_all(eMessage[MSG_NEW], charsmax(eMessage[MSG_NEW]), SYM_NEWLINE, REP_NEWLINE_CENTER)
client_print(id, print_center, eMessage[MSG_NEW])
}
case TYPE_HUD, TYPE_DHUD:
{
replace_all(eMessage[MSG_NEW], charsmax(eMessage[MSG_NEW]), SYM_NEWLINE, REP_NEWLINE_HUD)
switch(eMessage[MSG_TYPE])
{
case TYPE_HUD:
{
set_hudmessage(handle_color(eMessage[MSG_COLOR][0]), handle_color(eMessage[MSG_COLOR][1]), handle_color(eMessage[MSG_COLOR][2]),\
eMessage[MSG_POSITION][0], eMessage[MSG_POSITION][1], g_eValues[VALUE_EFFECTS], g_eValues[VALUE_FXTIME], g_eValues[VALUE_HOLDTIME],\
g_eValues[VALUE_FADEINTIME], g_eValues[VALUE_FADEOUTTIME])
show_hudmessage(id, eMessage[MSG_NEW])
}
case TYPE_DHUD:
{
set_dhudmessage(handle_color(eMessage[MSG_COLOR][0]), handle_color(eMessage[MSG_COLOR][1]), handle_color(eMessage[MSG_COLOR][2]),\
eMessage[MSG_POSITION][0], eMessage[MSG_POSITION][1], g_eValues[VALUE_EFFECTS], g_eValues[VALUE_FXTIME], g_eValues[VALUE_HOLDTIME],\
g_eValues[VALUE_FADEINTIME], g_eValues[VALUE_FADEOUTTIME])
show_dhudmessage(id, eMessage[MSG_NEW])
}
}
}
}
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public OnSendAudio(MsgId, MsgDest, MsgEntity)
{
static szMessage[32]
get_msg_arg_string(2, szMessage, charsmax(szMessage))
if(TrieKeyExists(g_tSounds, szMessage))
{
new szNewMessage[128]
TrieGetString(g_tSounds, szMessage, szNewMessage, charsmax(szNewMessage))
if(szNewMessage[0])
client_cmd(0, "spk %s", szNewMessage)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
handle_color(iColor)
return iColor == -1 ? random(256) : iColor
В этой теме было размещено решение! Перейти к решению.