RU
RU
UA
EN
PL
ГЛАВНАЯ
УСЛУГИ
ПЛАГИНЫ
КАРТЫ
REBUY
SCANMON
SALE
ФОРУМ
МОНИТОР
HELP
КОНТАКТ
Главная
/
Plugins
/
gameMe cstrike
gameMe cstrike
Теги:
Скачать плагины cs
Админские
Полностью переписанный плагин статистики для gameME
Компилятор: 1.8.2 Multibild
1147
Команды:
Настройки:
#define gameme_menu // Стандартное меню gameME (команды в чате gameme, /gameme, !gameme, gameme_menu, /gameme_menu, !gameme_menu)
#define say_me_and_say_hp // Добавляет недостающие команды /me и /hp
//#define use_only_not_alive // Использовать /me может только МЕРТВЫЙ игрок. Чтобы разрешить всем пользоваться, закомментируйте)
#define show_victim_me_and_hp_info // Информация /me и /hp после смерти игрока
//#define support_no_round_servers // Поддержка бесконечного раунда.
.sma / .sp
// *************************************************************************************// // Плагин загружен с www.neugomon.ru // // Автор: Neygomon [ https://neugomon.ru/members/1/ ] // // Официальная тема поддержки: https://neugomon.ru/threads/1329/ // // При копировании материала ссылка на сайт www.neugomon.ru ОБЯЗАТЕЛЬНА! // // *************************************************************************************// #include
#include
#include
#include
#include
#define gameme_menu // Стандартное меню gameME (команды в чате gameme, /gameme, !gameme, gameme_menu, /gameme_menu, !gameme_menu) #define say_me_and_say_hp // Добавляет недостающие команды /me и /hp #if defined say_me_and_say_hp #define use_only_not_alive // Использовать /me может только МЕРТВЫЙ игрок. Чтобы разрешить всем пользоваться, закомментируйте;) #define show_victim_me_and_hp_info // Информация /me и /hp после смерти игрока //#define support_no_round_servers // Поддержка бесконечного раунда. #endif #if defined gameme_menu enum _:MainMenu { ITEM[64], CMD[30] }; new g_szGameMeMenu[][MainMenu] = // команды в меню gameme { { "Позиция в рейтинге", "/rank" }, { "Кто впереди", "/next" }, { "Топ10 игроков", "/top10" }, { "Рейтинг кланов", "/clans" }, { "Статус сервера", "/status" }, { "Личная статистика", "/statsme" }, { "Использованные оружия", "/weapons" }, { "Точность", "/accuracy" }, { "Попадания", "/targets" }, { "Мои жертвы", "/kills" }, { "ВКЛ\ВЫКЛ статистику", "/gameme_hideranking" }, { "Обнулить статистику", "/gameme_reset" }, { "Читеры", "/cheaters" }, { "Показать помощь", "/help" } } #endif #if defined say_me_and_say_hp #include
enum _:SayMeHp { dmg, lasthit, killerid, killername[32], Float:distance, Float:hpkiller, Float:apkiller }; new g_iPlayerData[33][SayMeHp]; new const g_szHitPlaces[][] = { "-", "голову", "грудь", "живот", "левую руку", "правую руку", "левую ногу", "правую ногу" }; #endif new g_gameme_message_prefix; new Trie:g_blocked_commands; new g_msgSayText; #if defined gameme_menu new g_gameME_MainMenu; #endif new g_szLogIgnore[512]; new display_menu_keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9; public plugin_init() { #define VERSION "2.4[v4.5.4] edit neugomon" register_plugin("gameME Plugin", VERSION, "TTS Oetzel & Goerz GmbH | neugomon"); register_cvar("gameme_plugin_version", VERSION, FCVAR_SPONLY|FCVAR_SERVER); /* Hooks */ register_event("Damage", "eventDamage", "b", "2!0"); register_event("DeathMsg","eventDeathMsg", "a", "1>0"); register_logevent("eventRound_End", 2, "1=Round_End"); register_forward(FM_AlertMessage, "game_log_hook", false); RegisterHam(Ham_Spawn, "player", "client_spawn", true); /* Server CMDs */ register_srvcmd("gameme_amx_psay", "gameme_amx_psay", 0, "
- sends private message"); register_srvcmd("gameme_amx_psay2", "gameme_amx_psay2", 0, "
- sends green colored private message"); register_srvcmd("gameme_amx_hint", "gameme_amx_hint", 0, "
- sends hint message"); register_srvcmd("gameme_amx_say", "gameme_amx_say", 0, "
- sends message to all players"); register_srvcmd("gameme_amx_csay", "gameme_amx_csay", 0, "
- sends center hud message to all players"); register_srvcmd("gameme_amx_msay", "gameme_amx_msay", 0, "
- displays advanced information"); register_srvcmd("gameme_amx_browse", "gameme_amx_browse", 0, "
- displays internal browser"); register_srvcmd("gameme_block_commands_values", "gameme_block_commands_values", 0, "
- adds blocked chect commands"); register_menucmd(register_menuid("Display Menu"), display_menu_keys, "handle_internal_menu"); g_gameme_message_prefix = register_cvar("gameme_message_prefix", ""); g_blocked_commands = TrieCreate(); #if defined gameme_menu g_gameME_MainMenu = menu_create("gameME - Main Menu", "mainmenu_handle"); for(new i, num[2]; i < sizeof g_szGameMeMenu; i++) num[0] = i, menu_additem(g_gameME_MainMenu, g_szGameMeMenu[i][ITEM], num); register_clcmd("say gameme", "gameMeMainMenu"); register_clcmd("say_team gameme", "gameMeMainMenu"); register_clcmd("say /gameme", "gameMeMainMenu"); register_clcmd("say_team /gameme", "gameMeMainMenu"); register_clcmd("say !gameme", "gameMeMainMenu"); register_clcmd("say_team !gameme", "gameMeMainMenu"); register_clcmd("say gameme_menu", "gameMeMainMenu"); register_clcmd("say_team /gameme_menu", "gameMeMainMenu"); register_clcmd("say_team !gameme_menu", "gameMeMainMenu"); #endif #if defined say_me_and_say_hp register_clcmd("say /me", "ClCmdSayMe"); register_clcmd("say /hp", "ClCmdSayHp"); #endif register_clcmd("say", "gameme_block_commands"); register_clcmd("say_team", "gameme_block_commands"); g_msgSayText = get_user_msgid("SayText"); } #if defined say_me_and_say_hp public client_putinserver(id) arrayset(g_iPlayerData[id], 0, SayMeHp); #endif public game_log_hook(AlertType:type, message[]) { if(type != at_logged) return FMRES_IGNORED; if(g_szLogIgnore[0] == EOS) return FMRES_IGNORED; if(contain(message, g_szLogIgnore) == -1) return FMRES_IGNORED; if(contain(message, "position") != -1) return FMRES_IGNORED; g_szLogIgnore[0] = EOS; return FMRES_SUPERCEDE; } public eventDamage(id) { if(!is_user_connected(id)) return; static iAttackerWeapon, iAttackerBody, iAttacker; iAttacker = get_user_attacker(id, iAttackerWeapon, iAttackerBody); if(!is_user_connected(iAttacker) || id == iAttacker) return; #if defined say_me_and_say_hp g_iPlayerData[iAttacker][dmg] += read_data(2); g_iPlayerData[iAttacker][lasthit] = iAttackerBody; #endif if(!iAttackerWeapon) return; static AttackerTeam[16], AttackerWeaponName[24], AttackerName[32], AttackerAuthid[32]; static VictimTeam[16], VictimName[32], VictimAuthid[32]; get_user_name(iAttacker, AttackerName, charsmax(AttackerName)); get_user_team(iAttacker, AttackerTeam, charsmax(AttackerTeam)); get_user_authid(iAttacker, AttackerAuthid, charsmax(AttackerAuthid)); xmod_get_wpnname(iAttackerWeapon, AttackerWeaponName, charsmax(AttackerWeaponName)); get_user_name(id, VictimName, charsmax(VictimName)); get_user_team(id, VictimTeam, charsmax(VictimTeam)); get_user_authid(id, VictimAuthid, charsmax(VictimAuthid)); new AttackerHitzone[32] = "unknown"; switch(iAttackerBody) { case HIT_GENERIC: AttackerHitzone = "generic"; case HIT_HEAD: AttackerHitzone = "head"; case HIT_CHEST: AttackerHitzone = "chest"; case HIT_STOMACH: AttackerHitzone = "stomach"; case HIT_LEFTARM: AttackerHitzone = "left arm"; case HIT_RIGHTARM: AttackerHitzone = "right arm"; case HIT_LEFTLEG: AttackerHitzone = "left leg"; case HIT_RIGHTLEG: AttackerHitzone = "right leg"; } log_message("^"%s<%d><%s><%s>^" attacked ^"%s<%d><%s><%s>^" with ^"%s^" (damage ^"0^") (damage_armor ^"0^") (health ^"0^") (armor ^"0^") (hitgroup ^"%s^")", AttackerName, get_user_userid(iAttacker), AttackerAuthid, AttackerTeam, VictimName, get_user_userid(id), VictimAuthid, VictimTeam, AttackerWeaponName, AttackerHitzone ); } public eventDeathMsg() { static killer_id, victim_id, weapon[32]; killer_id = read_data(1); victim_id = read_data(2); dump_weaponstats(victim_id, 0); read_data(4, weapon, charsmax(weapon)); static killer_userid, killer_name[32], killer_team[16], killer_authid[32]; static killer_origin[3]; killer_userid = get_user_userid(killer_id); get_user_name(killer_id, killer_name, charsmax(killer_name)); get_user_team(killer_id, killer_team, charsmax(killer_team)); get_user_authid(killer_id, killer_authid, charsmax(killer_authid)); get_user_origin(killer_id, killer_origin); switch(killer_id == victim_id) { case 0: { if(!is_user_connected(victim_id)) return; static victim_origin[3], victim_name[32], victim_team[16], victim_authid[32]; get_user_name(victim_id, victim_name, charsmax(victim_name)); get_user_team(victim_id, victim_team, charsmax(victim_team)); get_user_authid(victim_id, victim_authid, charsmax(victim_authid)); get_user_origin(victim_id, victim_origin); new victim_userid = get_user_userid(victim_id); formatex(g_szLogIgnore, charsmax(g_szLogIgnore), "^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"", killer_name, killer_userid, killer_authid, killer_team, victim_name, victim_userid, victim_authid, victim_team, weapon ); log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^" (attacker_position ^"%d %d %d^") (victim_position ^"%d %d %d^")", killer_name, killer_userid, killer_authid, killer_team, victim_name, victim_userid, victim_authid, victim_team, weapon, killer_origin[0], killer_origin[1], killer_origin[2], victim_origin[0], victim_origin[1], victim_origin[2] ); if(read_data(3)) log_message("^"%s<%d><%s><%s>^" triggered ^"headshot^"", killer_name, killer_userid, killer_authid, killer_team) #if defined say_me_and_say_hp g_iPlayerData[victim_id][hpkiller] = _:entity_get_float(killer_id, EV_FL_health); g_iPlayerData[victim_id][apkiller] = _:entity_get_float(killer_id, EV_FL_armorvalue); g_iPlayerData[victim_id][distance] = _:(entity_range(killer_id, victim_id) * 0.0254); g_iPlayerData[victim_id][killerid] = killer_id; get_user_name(killer_id, g_iPlayerData[victim_id][killername], charsmax(g_iPlayerData[][killername])); #if defined show_victim_me_and_hp_info ClCmdSayHp(victim_id); ClCmdSayMe(victim_id); #endif #endif } case 1: { formatex(g_szLogIgnore, charsmax(g_szLogIgnore), "^"%s<%d><%s><%s>^" committed suicide with ^"%s^"", killer_name, killer_userid, killer_authid, killer_team, weapon ); log_message("^"%s<%d><%s><%s>^" committed suicide with ^"%s^" (attacker_position ^"%d %d %d^")", killer_name, killer_userid, killer_authid, killer_team, weapon, killer_origin[0], killer_origin[1], killer_origin[2] ); } } } public eventRound_End() { new players[32], pnum; get_players(players, pnum, "a"); for(new i; i < pnum; i++) dump_weaponstats(players[i], 1); #if defined say_me_and_say_hp ClearInfo(); #endif } public client_spawn(id) { if(is_user_alive(id)) reset_user_wstats(id); #if defined support_no_round_servers client_putinserver(id); #endif } public gameme_block_commands_values(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED; static commands[192]; read_argv(1, commands, charsmax(commands)); if(contain(commands, " ") != -1) { new temp_command[64], index, length = strlen(commands); new temp_length = copyc(temp_command, charsmax(temp_command), commands, ' ') + 1; TrieSetCell(g_blocked_commands, temp_command, 1); while(temp_length < length && ++index < 10) { temp_length += copyc(temp_command, 63, commands[temp_length], ' ') + 1; TrieSetCell(g_blocked_commands, temp_command, 1); } } else if(!strcmp(commands, "clear")) { TrieClear(g_blocked_commands); log_message("Server triggered ^"blocked_commands_cleared^""); } return PLUGIN_HANDLED; } public gameme_amx_psay(id, level, cid) return cmd_access(id, level, cid, 3) ? GameMEpSay(1) : PLUGIN_HANDLED; public gameme_amx_psay2(id, level, cid) return cmd_access(id, level, cid, 3) ? GameMEpSay(2) : PLUGIN_HANDLED; public gameme_amx_hint(id, level, cid) return cmd_access(id, level, cid, 2) ? GameMEpSay(3) : PLUGIN_HANDLED; public gameme_amx_say(id, level, cid) { if(cmd_access(id, level, cid, 2)) { static message_prefix[64],message[192]; get_pcvar_string(g_gameme_message_prefix, message_prefix, charsmax(message_prefix)); read_args(message, charsmax(message)); remove_quotes(message); if(message_prefix[0] == EOS) client_print(0, print_chat, message); else client_print(0, print_chat, "%s %s", message_prefix, message); } return PLUGIN_HANDLED; } public gameme_amx_csay(id, level, cid) { if(cmd_access(id, level, cid, 2)) { static message[192]; read_args(message, charsmax(message)); remove_quotes(message); set_hudmessage(255, 255, 255, -1.0, 0.3, 0, 6.0, 6.0, 0.5, 0.15, -1); show_hudmessage(0, message); } return PLUGIN_HANDLED } public gameme_amx_msay(id, level, cid) { if(!cmd_access(id, level, cid, 3)) return PLUGIN_HANDLED; static delay[8], name[32], handler_param[10], message[1024], menu_text[1024]; read_argv(1, delay, charsmax(delay)); read_argv(2, name, charsmax(name)); read_argv(3, handler_param, charsmax(handler_param)); read_args(message, 1023); copy(menu_text, 1023, message[strfind(message, "#") + strlen(name[1]) + 5]); remove_quotes(menu_text); new szMenu[1024]; for(new i = 1, start, nLen, buffer[1024]; i < strlen(menu_text); i++) { if(menu_text[i-1] != '^^' || menu_text[i] != 'n') continue; copy(buffer, (i - start)-1 , menu_text[start]); nLen += formatex(szMenu[nLen], charsmax(szMenu) - nLen, "%s^n", buffer); i += 1; start = i; } new userid = get_player_index(str_to_num(name[1])); if(userid > 0) { switch(str_to_num(handler_param)) { case 0: show_menu(userid, display_menu_keys, szMenu, 15); case 1: show_menu(userid, display_menu_keys, szMenu, 15, "Display Menu"); } } return PLUGIN_HANDLED; } public handle_internal_menu(id, key) { new player_use_key[10]; num_to_str(key+1, player_use_key, charsmax(player_use_key)); log_player_event(id, "selected", (key < 9) ? player_use_key : "cancel"); } public gameme_amx_browse(id, level, cid) { if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED; static name[32], message[1024], url[1024]; read_argv(1, name, charsmax(name)); read_args(message, charsmax(message)); copy(url, charsmax(url), message[strfind(message, "#") + strlen(name[1]) + 2]); remove_quotes(url); new userid = get_player_index(str_to_num(name[1])); if(userid > 0) show_motd(userid, url, "gameME Stats"); return PLUGIN_HANDLED; } public gameme_block_commands(client) { static user_command[30]; read_argv(1, user_command, charsmax(user_command)); if(TrieKeyExists(g_blocked_commands, user_command)) { log_player_event(client, "say", user_command); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } #if defined gameme_menu public gameMeMainMenu(id) { menu_display(id, g_gameME_MainMenu, 0); return PLUGIN_HANDLED; } public mainmenu_handle(id, menu, item) { if(item != MENU_EXIT) { new _access, itemData[2], clbk; menu_item_getinfo(menu, item, _access, itemData, charsmax(itemData), .callback = clbk); log_player_event(id, "say", g_szGameMeMenu[itemData[0]][CMD]); } return PLUGIN_HANDLED; } #endif #if defined say_me_and_say_hp public ClCmdSayMe(id) { #if defined use_only_not_alive if(is_user_alive(id)) { ChatColor(id, id, "^1[^3SayMe^1] ^4Данная функция доступна ^3только ^4мертвым игрокам!"); return PLUGIN_HANDLED; } #endif switch(g_iPlayerData[id][dmg]) { case 0: ChatColor(id, id, "^1[^3SayMe^1] ^4Вы ни в кого ^3не ^4попали."); default:ChatColor(id, id, "^1[^3SayMe^1] ^4Вы нанесли ^3%d^4 урона. Последнее попадание в ^3%s^4.", g_iPlayerData[id][dmg], g_szHitPlaces[g_iPlayerData[id][lasthit]]); } return PLUGIN_HANDLED; } public ClCmdSayHp(id) { switch(g_iPlayerData[id][killerid]) { case 0: ChatColor(id, id, "^1[^3SayHp^1] ^4Вас ^3никто ^4не убивал."); default:ChatColor(id, g_iPlayerData[id][killerid], "^1[^3SayHp^1] ^4Вас убил ^3%s^4 с расстояния ^3%.0f^4 метров. У него осталось ^3%.0f^1HP ^4и ^3%.0f^1AP", g_iPlayerData[id][killername], g_iPlayerData[id][distance], g_iPlayerData[id][hpkiller], g_iPlayerData[id][apkiller]); } return PLUGIN_HANDLED; } ClearInfo() { #if AMXX_VERSION_NUM < 183 new MaxClients = get_maxplayers(); #endif for(new id = 1; id <= MaxClients; id++) arrayset(g_iPlayerData[id], 0, SayMeHp); } stock ChatColor(id, id2, const szMessage[], any:...) { if(!is_user_connected(id)) return; new szMsg[190]; vformat(szMsg, charsmax(szMsg), szMessage, 4); #define msgSayText 76 message_begin(MSG_ONE_UNRELIABLE, msgSayText, .player = id); write_byte(id2); write_string(szMsg); message_end(); } #endif log_player_event(client, verb[32], player_event[]) { if(!is_user_connected(client)) return; static player_name[32], player_team[16], player_authid[32]; get_user_name(client, player_name, charsmax(player_name)); get_user_team(client, player_team, charsmax(player_team)); get_user_authid(client, player_authid, charsmax(player_authid)); log_message("^"%s<%d><%s><%s>^" %s ^"%s^"", player_name, get_user_userid(client), player_authid, player_team, verb, player_event); } dump_weaponstats(id, valid) { if(!valid && !is_user_connected(id)) return; new iStats[8], iHits[8]; new iUserid = get_user_userid(id); new _max = xmod_get_maxweapons(); static szTeam[16], szName[32], szAuthid[32], szWeapon[24]; get_user_team(id, szTeam, charsmax(szTeam)); get_user_name(id, szName, charsmax(szName)); get_user_authid(id, szAuthid, charsmax(szAuthid)); for(new i = 1; i < _max; ++i) { if(!get_user_wstats(id, i, iStats, iHits)) continue; xmod_get_wpnname(i, szWeapon, charsmax(szWeapon)); log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^")", szName, iUserid, szAuthid, szTeam, szWeapon, iStats[4], iStats[5], iStats[0], iStats[2], iStats[3], iStats[6], iStats[1] ); log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"%s^") (head ^"%d^") (chest ^"%d^") (stomach ^"%d^") (leftarm ^"%d^") (rightarm ^"%d^") (leftleg ^"%d^") (rightleg ^"%d^")", szName, iUserid, szAuthid, szTeam, szWeapon, iHits[1], iHits[2], iHits[3], iHits[4], iHits[5], iHits[6], iHits[7] ); } } GameMEpSay(msg_type) { static client_id[192]; read_argv(1, client_id, charsmax(client_id)); new message_recipients[32][16]; new recipients_count = 0; if(contain(client_id, ",") != -1) { new index, length = strlen(client_id), temp_length = copyc(message_recipients[index], charsmax(message_recipients[]), client_id, ',') + 1; while(temp_length < length && ++index < charsmax(message_recipients)) temp_length += copyc(message_recipients[index], charsmax(message_recipients[]), client_id[temp_length], ',') + 1; recipients_count = index + 1; } else { copy(message_recipients[0], charsmax(message_recipients[]), client_id[(contain(client_id, "#") != -1) ? 1 : 0]); recipients_count = 1; } if(!recipients_count) return PLUGIN_HANDLED; static colored_param[32]; read_argv(2, colored_param, charsmax(colored_param)); new is_colored, ignore_param; switch(str_to_num(colored_param)) { case 0: ignore_param = 1; case 1: is_colored = ignore_param = 1; } new client_message[192] for(new i = 1 + ignore_param, temp_argument[192]; i < read_argc(); i++) { read_argv(i + 1, temp_argument, charsmax(temp_argument)) if(i > 1 + ignore_param) { if(charsmax(temp_argument) - strlen(client_message) > strlen(temp_argument)) { if(temp_argument[0] == 41 || temp_argument[0] == 125) copy(client_message[strlen(client_message)], charsmax(client_message), temp_argument); else { if(!strlen(client_message)) copy(client_message[strlen(client_message)], charsmax(client_message), temp_argument); switch(client_message[strlen(client_message)-1]) { case 39, 40, 44, 58, 123: copy(client_message[strlen(client_message)], charsmax(client_message), temp_argument); default: { if( strcmp(temp_argument, ":") != 0 && strcmp(temp_argument, ",") != 0 && strcmp(temp_argument, "'") != 0 ) client_message[strlen(client_message)] = 32; copy(client_message[strlen(client_message)], charsmax(client_message), temp_argument); } } } } } else if(sizeof(temp_argument) - strlen(client_message) > strlen(temp_argument)) copy(client_message[strlen(client_message)], charsmax(client_message), temp_argument); } switch(msg_type) { case 1, 2: { static message_prefix[64], display_message[192]; get_pcvar_string(g_gameme_message_prefix, message_prefix, charsmax(message_prefix)); if(message_prefix[0] == EOS) { display_message[0] = 0x01; formatex(display_message[1], charsmax(display_message) - 1, client_message); } else { display_message[0] = 0x04; formatex(display_message[1], charsmax(display_message) - 1, message_prefix); display_message[strlen(message_prefix) + 1] = 0x01; formatex(display_message[strlen(message_prefix) + 2], sizeof display_message - strlen(message_prefix) + 2, " %s", client_message); } new color_index = -1; if(msg_type == 1 && is_colored) { color_index = color_all_players(display_message); new replace_message[2]; replace_message[0] = 0x04; replace_all(display_message, charsmax(display_message), "x04", replace_message); replace_message[0] = 0x03; replace_all(display_message, charsmax(display_message), "x03", replace_message); replace_message[0] = 0x01; replace_all(display_message, charsmax(display_message), "x01", replace_message); } for(new i, player_index; i < recipients_count; i++) { player_index = get_player_index(str_to_num(message_recipients[i])); if(player_index == -1) continue; if(color_index == -1) color_index = player_index; message_begin(MSG_ONE, g_msgSayText, .player = player_index); write_byte(color_index); write_string(display_message); message_end(); } } case 3: { for(new i, player_index; i < recipients_count; i++) { player_index = get_player_index(str_to_num(message_recipients[i])); if(player_index == -1) continue; set_hudmessage(255, 128, 0, -1.0, 0.80, 0, 6.0, 6.0, 0.5, 0.15, -1); show_hudmessage(player_index, client_message); } } } return PLUGIN_HANDLED; } stock color_all_players(message[192]) { new players[32], pnum; new index = -1; new low_client; new arrName[32][32], arrColors[32], arrSize; get_players(players, pnum); for(new i, pos, low_pos = sizeof message; i < pnum; i++) { get_user_name(players[i], arrName[arrSize], charsmax(arrName[])); pos = contain(message, arrName[arrSize]); if(pos == -1) continue; if(low_pos > pos) low_pos = pos, low_client = players[i]; arrColors[arrSize++] = players[i]; } for(new i, colored_name[32]; i < arrSize; i++) { if(arrColors[i] == low_client) { formatex(colored_name, charsmax(colored_name), "^3%s^1", arrName[i]); index = arrColors[i]; } else formatex(colored_name, charsmax(colored_name), "^4%s^1", arrName[i]); replace_all(message, charsmax(message), arrName[i], colored_name); } return index; } stock get_player_index(client) { if(client > 0) { new players[32], pnum; get_players(players, pnum, "ch"); for(new i; i < pnum; i++) if(get_user_userid(players[i]) == client) return players[i]; } return -1; }
Отправить
Загрузил
Varder
2018-11-03 18:38:22
0
55
Установить на сервер
Скачать
Нет оплаченых серверов
Купить сервер CS 1.6
Купить сервер CS:GO
Купить сервер CSS v34
Подключить свой VDS к панели
Данная иконка означает, что плагин был проверен администрацией хостинга на тестовом сервере, и проблем с ним не было выявлено. Рекомендуем ставить исключительно проверенные плагины.
Плагин загружен на сервер, но проверка еще не была проведена.
CSHOST.COM.UA 2012-2024 Хостинг игровых серверов