unnkown command: amx_teammenu

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
28
Реакции
-1
Помог
1 раз(а)
Ошибка
На сервер не работает amx_teammenu, amx_slapmenu. Ни через отдельные команды как здесь написано, ни через menufront(amxmodmenu). menufront стоит не дефолтное, хотя когда убираю его так же не работает
ОС
Linux
Amx Mod X
AMX Mod X 1.8.3-Re (http://www.amxmodx.org) 
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert

Authors (ReHLDS Team):
"Adidasman", "s1lent"
Compiled: Dec 24 2016 15:59:38
Build ID: 7
Core mode: JIT + ASM32
Билд
Protocol version 48 
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.664-dev-myarena.ru
Build date: 15:50:45 Sep 24 2018 (1626)
Build from: https://github.com/dreamstalker/rehlds/commit/83f53fb
ReGamedll
ReGameDLL version: 5.7.0.310-dev 
Build date: 05:50:50 May 24 2018
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/8e3b6f4
Версия Metamod
Metamod v1.21p37 2013/05/30 (5:13) 
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
Список метамодулей
Currently loaded plugins: 
description stat pend file vers src load unlod
[ 1] Reunion RUN - reunion_mm_i386. v0.1.0.1 ini Start Never
[ 2] SafeNameAndChat RUN - SafeNameAndChat. v1.1 ini ANY ANY
[ 3] AMX Mod X RUN - amxmodx_mm_i386. v1.8.3-R ini Start ANY
[ 4] ProcessCmds RUN - processcmds_mm_i v1.1.5 ini Start Never
[ 5] WHBlocker fail load whblocker_mm_i38 v1.5.570 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i38 v2.4 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 8] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 9] MySQL RUN - mysql_amxx_i386. v1.8.3-R pl3 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i3 v1.8.3-R pl3 ANY ANY
[11] CSX RUN - csx_amxx_i386.so v1.8.3-R pl3 ANY ANY
[12] CStrike RUN - cstrike_amxx_i38 v1.8.3-R pl3 ANY ANY
[13] Ham Sandwich RUN - hamsandwich_amxx v1.8.3-R pl3 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.8.3-R pl3 ANY ANY
[15] Engine RUN - engine_amxx_i386 v1.8.3-R pl3 ANY ANY
[16] GeoIP RUN - geoip_amxx_i386. v1.8.3-R pl3 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386. v5.6.0.1 pl3 ANY Never
17 plugins, 16 running
Список плагинов
[ 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.3-dev+ AMXX Dev Team antiflood.amxx running
[ 4] Admin Base 1.8.3-dev+ AMXX Dev Team admin.amxx stopped
[ 5] Admin Commands 1.8.3-dev+ AMXX Dev Team admincmd.amxx running
[ 6] Admin Help 1.8.3-dev+ AMXX Dev Team adminhelp.amxx running
[ 7] Slots Reservation 1.8.3-dev+ AMXX Dev Team adminslots.amxx running
[ 8] Admin Votes 1.8.3-dev+ AMXX Dev Team adminvote.amxx running
[ 9] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 10] Commands Menu 1.8.3-dev+ AMXX Dev Team cmdmenu.amxx running
[ 11] Info. Messages 1.8.3-dev+ AMXX Dev Team imessage.amxx running
[ 12] Maps Menu 1.8.3-dev+ AMXX Dev Team mapsmenu.amxx running
[ 13] AmxModMenu_New 2.0 CaNiBaL menufront.amxx running
[ 14] CS Misc. Stats 1.8.3-dev+ AMXX Dev Team miscstats.amxx running
[ 15] Multi-Lingual System 1.8.3-dev+ AMXX Dev Team multilingual.am running
[ 16] Pause Plugins 1.8.3-dev+ AMXX Dev Team pausecfg.amxx running
[ 17] Players Menu 1.8.3-dev+ AMXX Dev Team plmenu.amxx running
[ 18] Restrict Weapons 1.8.3-dev+ AMXX Dev Team restmenu.amxx running
[ 19] Scrolling Message 1.8.3-dev+ AMXX Dev Team scrollmsg.amxx running
[ 20] CS Stats Logging 1.8.3-dev+ AMXX Dev Team stats_logging.a running
[ 21] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 22] Teleport Menu 1.8.3-dev+ AMXX Dev Team telemenu.amxx running
[ 23] TimeLeft 1.8.3-dev+ AMXX Dev Team timeleft.amxx running
[ 24] Plugin Menu 1.8.3-dev+ AMXX Dev Team pluginmenu.amxx running
[ 25] Admin Base (SQL) 1.8.3-dev+ AMXX Dev Team admin_sql.amxx stopped
[ 26] Gag Me 2.3.4 Radius gag_me.amxx running
[ 27] Anti reconnect 3.0 JohnJ antireconnect.a running
[ 28] High Ping Kicker 1.0 Shadow/Bo0m! amx_hpk.amxx running
[ 29] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 30] Map Manager 2.5.54 Mistrick mapmanager.amxx running
[ 31] Map Manager: Sub Plugi 0.1 Mistrick mapmanager_subp running
[ 32] Descriptive 'Fire in t 0.1 VEN descriptive_fir running
[ 33] Lite Translit 2.5.7b/11 neygomon lite_translit.a running
[ 34] Star Damager 1.0 Seroff Damager.amxx running
[ 35] Info Rank 0.1 by CepeH9 INFO_RANK_V0.1. running
[ 36] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 37] StatsX (MastaMan Editi 1.8.1.3746 AMXX Dev Team & statsx_shell.am running
[ 38] Automatic knife duel 0.3 JGHG automatic_knife running
[ 39] AntiFlash FINAL 5.0 Leo_[BH] antiflash5.amxx running
[ 40] Hud_Info+IP 2.0 DeIIyTaT Hud_Info.amxx running
[ 41] Kill_Info_Hud 1.0 Dom1no_[KZ] info_kill.amxx running
[ 42] Real Nade Drops 0.4 VEN realnadedrops.a running
[ 43] Ultimate Sounds 1.7 Dizzy / Bmann_42 f_ultimate_soun running
[ 44] Weapon Model + Sound R 1.2 GHW_Chronic GHW_Weapon_Repl running
[ 45] C4 CD Voice 1.1 c4timer_for_dv-z c4cdvoice.amxx running
[ 46] Bomb HUD Timer 0.2 Twe3k Bomb_HuD.amxx running
[ 47] Smoke: HealthNade 0.0.2 wopox1337 Smoke_HealthNad running
[ 48] Random Weapons WarmUP 1.6 neugomon random_weapons_ running
[ 49] V.I.P Custom AK-47 1.0.0 Vaqtincha custom_ak47.amx running
[ 50] V.I.P Custom AWP 1.0.0 Vaqtincha custom_awp.amxx running
[ 51] V.I.P Custom DEAGLE 1.0.0 Vaqtincha custom_deagle.a running
[ 52] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am running
[ 53] V.I.P Custom M4A1 1.0.0 Vaqtincha custom_m4a1.amx running
[ 54] Steam Bonus 1.2 Stimul steam_bonus.amx running
[ 55] Death Sprite 1.0 DarkGL skull.amxx running
[ 56] Players Count in Team 2.0 kramesa PlayersCountSel running
[ 57] Block Pickup Gold 0.1 Vaqtincha blockpickupgold running
[ 58] unknown unknown unknown CityConnect.amx bad load
[ 59] Swear Replacement 1.5 kaboomkazoom swear_replaceme running
[ 60] Night VIP 0.1 F@nt0M night_vip.amxx running
[ 61] Instant AutoTeamBalanc 1.2.0 ConnorMcLeod instant_autotea running
[ 62] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx running
[ 63] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 64] AES: Admin Tools 0.5 Vega serfreeman1337 aes_exp_editor. running
[ 65] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike running
[ 66] AES: Bonus System 0.5 Vega serfreeman1337 aes_bonus_syste running
[ 67] AES: Bonus CSTRIKE 0.5 Vega serfreeman1337 aes_bonus_cstri running
[ 68] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 69] [ReAPI] Parachute 1.1 ReHLDS Team parachute.amxx running
[ 70] Lite AwpLimit 1.09 neygomon awp.amxx running
[ 71] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx debug
[ 72] AMXBans: Screens Gm 1.6 Larte Team amxbans_ssban.a running
( 58) Load fails: Module/Library "geoipse" required for plugin. Check modules.ini.
72 plugins, 69 running
Автор плагина
Дефолтный плагин, который шёл в комплекте с amxx этого сайта
Версия плагина
Дефолтный плагин, который шёл в комплекте с amxx этого сайта
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <colorchat>

/** skip autoloading since it's optional */
#define AMXMODX_NOAUTOLOAD
#include <cstrike>

new g_menuPosition[33]
new g_menuPlayers[33][32]
new g_menuPlayersNum[33]
new g_menuOption[33]
new g_menuSettings[33]

new g_menuSelect[33][64]
new g_menuSelectNum[33]

#define MAX_CLCMDS 24

new g_clcmdName[MAX_CLCMDS][32]
new g_clcmdCmd[MAX_CLCMDS][64]
new g_clcmdMisc[MAX_CLCMDS][2]
new g_clcmdNum

new g_coloredMenus
new g_cstrike = 0

new Array:g_bantimes;
new Array:g_slapsettings;

new g_CSTeamNames[3][] = {
"TERRORIST",
"CT",
"SPECTATOR"
}
new g_CSTeamNumbers[3][] = {
"1",
"2",
"6"
}
new g_CSTeamiNumbers[3] = {
1,
2,
6
}


public plugin_natives()
{
set_module_filter("module_filter")
set_native_filter("native_filter")
}

public plugin_init()
{
register_plugin("Players Menu", AMXX_VERSION_STR, "AMXX Dev Team")
register_dictionary("common.txt")
register_dictionary("admincmd.txt")
register_dictionary("plmenu.txt")

register_clcmd("amx_kickmenu", "cmdKickMenu", ADMIN_KICK, "- displays kick menu")
register_clcmd("amx_banmenu", "cmdBanMenu", ADMIN_BAN, "- displays ban menu")
register_clcmd("amx_slapmenu", "cmdSlapMenu", ADMIN_SLAY, "- displays slap/slay menu")
register_clcmd("amx_teammenu", "cmdTeamMenu", ADMIN_LEVEL_A, "- displays team menu")
register_clcmd("amx_clcmdmenu", "cmdClcmdMenu", ADMIN_LEVEL_A, "- displays client cmds menu")

register_menucmd(register_menuid("Ban Menu"), 1023, "actionBanMenu")
register_menucmd(register_menuid("Kick Menu"), 1023, "actionKickMenu")
register_menucmd(register_menuid("Slap/Slay Menu"), 1023, "actionSlapMenu")
register_menucmd(register_menuid("Team Menu"), 1023, "actionTeamMenu")
register_menucmd(register_menuid("Client Cmds Menu"), 1023, "actionClcmdMenu")


g_bantimes = ArrayCreate();
// Load up the old default values
ArrayPushCell(g_bantimes, 0);
ArrayPushCell(g_bantimes, 5);
ArrayPushCell(g_bantimes, 10);
ArrayPushCell(g_bantimes, 15);
ArrayPushCell(g_bantimes, 30);
ArrayPushCell(g_bantimes, 45);
ArrayPushCell(g_bantimes, 60);


g_slapsettings = ArrayCreate();
// Old default values
ArrayPushCell(g_slapsettings, 0); // First option is ignored - it is slay
ArrayPushCell(g_slapsettings, 0); // slap 0 damage
ArrayPushCell(g_slapsettings, 1);
ArrayPushCell(g_slapsettings, 5);


register_srvcmd("amx_plmenu_bantimes", "plmenu_setbantimes");
register_srvcmd("amx_plmenu_slapdmg", "plmenu_setslapdmg");

g_coloredMenus = colored_menus()

new clcmds_ini_file[64]
get_configsdir(clcmds_ini_file, 63)
format(clcmds_ini_file, 63, "%s/clcmds.ini", clcmds_ini_file)
load_settings(clcmds_ini_file)

if (module_exists("cstrike"))
g_cstrike = 1
}
public plmenu_setbantimes()
{
new buff[32];
new args = read_argc();

if (args <= 1)
{
server_print("usage: amx_plmenu_bantimes <time1> [time2] [time3] ...");
server_print(" use time of 0 for permanent.");

return;
}

ArrayClear(g_bantimes);

for (new i = 1; i < args; i++)
{
read_argv(i, buff, charsmax(buff));

ArrayPushCell(g_bantimes, str_to_num(buff));

}

}
public plmenu_setslapdmg()
{
new buff[32];
new args = read_argc();

if (args <= 1)
{
server_print("usage: amx_plmenu_slapdmg <dmg1> [dmg2] [dmg3] ...");
server_print(" slay is automatically set for the first value.");

return;
}

ArrayClear(g_slapsettings);

ArrayPushCell(g_slapsettings, 0); // compensate for slay

for (new i = 1; i < args; i++)
{
read_argv(i, buff, charsmax(buff));

ArrayPushCell(g_slapsettings, str_to_num(buff));

}

}
public module_filter(const module[])
{
if (equali(module, "cstrike"))
return PLUGIN_HANDLED

return PLUGIN_CONTINUE
}

public native_filter(const name[], index, trap)
{
if (!trap)
return PLUGIN_HANDLED

return PLUGIN_CONTINUE
}

/* Ban menu */

public actionBanMenu(id, key)
{
switch (key)
{
case 7:
{
/* BEGIN OF CHANGES BY MISTAGEE ADDED A FEW MORE OPTIONS */

++g_menuOption[id]
g_menuOption[id] %= ArraySize(g_bantimes);

g_menuSettings[id] = ArrayGetCell(g_bantimes, g_menuOption[id]);

displayBanMenu(id, g_menuPosition[id])
}
case 8: displayBanMenu(id, ++g_menuPosition[id])
case 9: displayBanMenu(id, --g_menuPosition[id])
default:
{
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new name[32], name2[32], authid[32], authid2[32]

get_user_name(player, name2, 31)
get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)

new userid2 = get_user_userid(player)

log_amx("Ban: ^"%s<%d><%s><>^" ban and kick ^"%s<%d><%s><>^" (minutes ^"%d^")", name, get_user_userid(id), authid, name2, userid2, authid2, g_menuSettings[id])

if (g_menuSettings[id]==0) // permanent
{
new maxpl = get_maxplayers();
for (new i = 1; i <= maxpl; i++)
{
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "PERM");
}
}
else
{
new tempTime[32];
formatex(tempTime,sizeof(tempTime)-1,"%d",g_menuSettings[id]);
new maxpl = get_maxplayers();
for (new i = 1; i <= maxpl; i++)
{
show_activity_id(i, id, name, "%L %s %L", i, "BAN", name2, i, "FOR_MIN", tempTime);
}
}
/* ---------- check for Steam ID added by MistaGee --------------------
IF AUTHID == 4294967295 OR VALVE_ID_LAN OR HLTV, BAN PER IP TO NOT BAN EVERYONE */

if (equal("4294967295", authid2)
|| equal("HLTV", authid2)
|| equal("STEAM_ID_LAN", authid2)
|| equali("VALVE_ID_LAN", authid2))
{
/* END OF MODIFICATIONS BY MISTAGEE */
new ipa[32]
get_user_ip(player, ipa, 31, 1)

server_cmd("addip %d %s;writeip", g_menuSettings[id], ipa)
}
else
{
server_cmd("banid %d #%d kick;writeid", g_menuSettings[id], userid2)
}

server_exec()

displayBanMenu(id, g_menuPosition[id])
}
}

return PLUGIN_HANDLED
}

displayBanMenu(id, pos)
{
if (pos < 0)
return

get_players(g_menuPlayers[id], g_menuPlayersNum[id])

new menuBody[512]
new b = 0
new i
new name[32]
new start = pos * 7

if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "BAN_MENU", pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

new iMainAdmin = get_user_flags(id) & ADMIN_RCON

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a < end; ++a)
{
i = g_menuPlayers[id][a]
get_user_name(i, name, 31)

if (is_user_bot(i) || (access(i, ADMIN_IMMUNITY | ADMIN_KICK) && !iMainAdmin && i != id))
{
++b

if (g_coloredMenus)
len += format(menuBody[len], 511-len, "\d%d. %s^n\w", b, name)
else
len += format(menuBody[len], 511-len, "#. %s^n", name)
} else {
keys |= (1<<b)

if (is_user_admin(i))
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*^n\w" : "%d. %s *^n", ++b, name)
else
len += format(menuBody[len], 511-len, "%d. %s^n", ++b, name)
}
}

if (g_menuSettings[id])
len += format(menuBody[len], 511-len, "^n8. %L^n", id, "BAN_FOR_MIN", g_menuSettings[id])
else
len += format(menuBody[len], 511-len, "^n8. %L^n", id, "BAN_PERM")

if (end != g_menuPlayersNum[id])
{
format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else
format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")

show_menu(id, keys, menuBody, -1, "Ban Menu")
}

public cmdBanMenu(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

g_menuOption[id] = 0

if (ArraySize(g_bantimes) > 0)
{
g_menuSettings[id] = ArrayGetCell(g_bantimes, g_menuOption[id]);
}
else
{
// should never happen, but failsafe
g_menuSettings[id] = 0
}
displayBanMenu(id, g_menuPosition[id] = 0)

return PLUGIN_HANDLED
}

/* Slap/Slay */

public actionSlapMenu(id, key)
{
switch (key)
{
case 7:
{
++g_menuOption[id]

g_menuOption[id] %= ArraySize(g_slapsettings);

g_menuSettings[id] = ArrayGetCell(g_slapsettings, g_menuOption[id]);

displaySlapMenu(id, g_menuPosition[id]);
}
case 8: displaySlapMenu(id, ++g_menuPosition[id])
case 9: displaySlapMenu(id, --g_menuPosition[id])
default:
{
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new name2[32]

get_user_name(player, name2, 31)

if (!is_user_alive(player))
{
client_print(id, print_chat, "%L", id, "CANT_PERF_DEAD", name2)
displaySlapMenu(id, g_menuPosition[id])
return PLUGIN_HANDLED
}

new authid[32], authid2[32], name[32]

get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)

if (g_menuOption[id])
{
log_amx("Cmd: ^"%s<%d><%s><>^" slap with %d damage ^"%s<%d><%s><>^"", name, get_user_userid(id), authid, g_menuSettings[id], name2, get_user_userid(player), authid2)

ColorChat(0, RED, "^x04[Сервер] ^x01Администратор ^x04%s ^x01стукнул ^x04%s ^x01на ^x04%d ^x03HP", name, name2, g_menuSettings[id]);
} else {
log_amx("Cmd: ^"%s<%d><%s><>^" slay ^"%s<%d><%s><>^"", name, get_user_userid(id), authid, name2, get_user_userid(player), authid2)

ColorChat(0, RED, "^x04[Сервер] ^x01Администратор ^x04%s ^x01убил ^x04%s", name, name2);
}

if (g_menuOption[id])
user_slap(player, (get_user_health(player) > g_menuSettings[id]) ? g_menuSettings[id] : 0)
else
user_kill(player)

displaySlapMenu(id, g_menuPosition[id])
}
}

return PLUGIN_HANDLED
}

displaySlapMenu(id, pos)
{
if (pos < 0)
return

get_players(g_menuPlayers[id], g_menuPlayersNum[id])

new menuBody[512]
new b = 0
new i
new name[32], team[4]
new start = pos * 7

if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "SLAP_SLAY_MENU", pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

new iMainAdmin = get_user_flags(id) & ADMIN_RCON

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a < end; ++a)
{
i = g_menuPlayers[id][a]
get_user_name(i, name, 31)

if (g_cstrike)
{
if (cs_get_user_team(i) == CS_TEAM_T)
{
copy(team, 3, "TE")
}
else if (cs_get_user_team(i) == CS_TEAM_CT)
{
copy(team, 3, "CT")
} else {
get_user_team(i, team, 3)
}
} else {
get_user_team(i, team, 3)
}

if (!is_user_alive(i) || (access(i, ADMIN_IMMUNITY | ADMIN_KICK) && !iMainAdmin && i != id))
{
++b

if (g_coloredMenus)
len += format(menuBody[len], 511-len, "\d%d. %s\R%s^n\w", b, name, team)
else
len += format(menuBody[len], 511-len, "#. %s %s^n", name, team)
} else {
keys |= (1<<b)

if (is_user_admin(i))
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*\y\R%s^n\w" : "%d. %s * %s^n", ++b, name, team)
else
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s\y\R%s^n\w" : "%d. %s %s^n", ++b, name, team)
}
}

if (g_menuOption[id])
len += format(menuBody[len], 511-len, "^n8. %L^n", id, "SLAP_WITH_DMG", g_menuSettings[id])
else
len += format(menuBody[len], 511-len, "^n8. %L^n", id, "SLAY")

if (end != g_menuPlayersNum[id])
{
format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else
format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")

show_menu(id, keys, menuBody, -1, "Slap/Slay Menu")
}

public cmdSlapMenu(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

g_menuOption[id] = 0
if (ArraySize(g_slapsettings) > 0)
{
g_menuSettings[id] = ArrayGetCell(g_slapsettings, g_menuOption[id]);
}
else
{
// should never happen, but failsafe
g_menuSettings[id] = 0
}

displaySlapMenu(id, g_menuPosition[id] = 0)

return PLUGIN_HANDLED
}

/* Kick */

public actionKickMenu(id, key)
{
switch (key)
{
case 8: displayKickMenu(id, ++g_menuPosition[id])
case 9: displayKickMenu(id, --g_menuPosition[id])
default:
{
new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
new authid[32], authid2[32], name[32], name2[32]

get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)
get_user_name(player, name2, 31)

new userid2 = get_user_userid(player)

log_amx("Kick: ^"%s<%d><%s><>^" kick ^"%s<%d><%s><>^"", name, get_user_userid(id), authid, name2, userid2, authid2)

ColorChat(0, RED, "^x04[Сервер] ^x01Администратор ^x04%s ^x01кикнул ^x04%s", name, name2);


server_cmd("kick #%d", userid2)
server_exec()

displayKickMenu(id, g_menuPosition[id])
}
}

return PLUGIN_HANDLED
}

displayKickMenu(id, pos)
{
if (pos < 0)
return

get_players(g_menuPlayers[id], g_menuPlayersNum[id])

new menuBody[512]
new b = 0
new i
new name[32]
new start = pos * 8

if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "KICK_MENU", pos + 1, (g_menuPlayersNum[id] / 8 + ((g_menuPlayersNum[id] % 8) ? 1 : 0)))
new end = start + 8
new keys = MENU_KEY_0

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

new iMainAdmin = get_user_flags(id) & ADMIN_RCON

for (new a = start; a < end; ++a)
{
i = g_menuPlayers[id][a]
get_user_name(i, name, 31)

if (access(i, ADMIN_IMMUNITY | ADMIN_KICK) && !iMainAdmin && i != id)
{
++b

if (g_coloredMenus)
len += format(menuBody[len], 511-len, "\d%d. %s^n\w", b, name)
else
len += format(menuBody[len], 511-len, "#. %s^n", name)
} else {
keys |= (1<<b)

if (is_user_admin(i))
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*^n\w" : "%d. %s *^n", ++b, name)
else
len += format(menuBody[len], 511-len, "%d. %s^n", ++b, name)
}
}

if (end != g_menuPlayersNum[id])
{
format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else
format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")

show_menu(id, keys, menuBody, -1, "Kick Menu")
}

public cmdKickMenu(id, level, cid)
{
if (cmd_access(id, level, cid, 1))
displayKickMenu(id, g_menuPosition[id] = 0)

return PLUGIN_HANDLED
}

/* Team menu */

public actionTeamMenu(id, key)
{
switch (key)
{
case 7:
{
g_menuOption[id] = (g_menuOption[id] + 1) % (g_cstrike ? 3 : 2);
displayTeamMenu(id, g_menuPosition[id])
}
case 8: displayTeamMenu(id, ++g_menuPosition[id])
case 9: displayTeamMenu(id, --g_menuPosition[id])
default:
{
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new authid[32], authid2[32], name[32], name2[32]

get_user_name(player, name2, 31)
get_user_authid(id, authid, 31)
get_user_authid(player, authid2, 31)
get_user_name(id, name, 31)

log_amx("Cmd: ^"%s<%d><%s><>^" transfer ^"%s<%d><%s><>^" (team ^"%s^")", name, get_user_userid(id), authid, name2, get_user_userid(player), authid2, g_menuOption[id] ? "TERRORIST" : "CT")

ColorChat(0, RED, "^x04[Сервер] ^x01Администратор ^x04%s ^x01перевёл ^x04%s ^x01за ^x03%s", name, name2, g_CSTeamNames[g_menuOption[id] % 3]);

if (g_cstrike)
{
if (is_user_alive(player))
{
new deaths = cs_get_user_deaths(player)
user_kill(player, 1)
cs_set_user_deaths(player, deaths)
}
// This modulo math just aligns the option to the CsTeams-corresponding number
cs_set_user_team(player, (g_menuOption[id] % 3) + 1)
cs_reset_user_model(player)
const m_iMenu = 205
set_pdata_int(player, m_iMenu, 0)
} else {
new limit_setting = get_cvar_num("mp_limitteams")

set_cvar_num("mp_limitteams", 0)
engclient_cmd(player, "jointeam", g_CSTeamNumbers[g_menuOption[id] % 2])
engclient_cmd(player, "joinclass", "1")
set_cvar_num("mp_limitteams", limit_setting)
const m_iMenu = 205
set_pdata_int(player, m_iMenu, 0)
}

displayTeamMenu(id, g_menuPosition[id])
}
}

return PLUGIN_HANDLED
}

displayTeamMenu(id, pos)
{
if (pos < 0)
return

get_players(g_menuPlayers[id], g_menuPlayersNum[id])

new menuBody[512]
new b = 0
new i, iteam
new name[32], team[4]
new start = pos * 7

if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "TEAM_MENU", pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

new iMainAdmin = get_user_flags(id) & ADMIN_RCON

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a < end; ++a)
{
i = g_menuPlayers[id][a]
get_user_name(i, name, 31)

if (g_cstrike)
{
iteam = _:cs_get_user_team(i)

if (iteam == 1)
{
copy(team, 3, "TE")
}
else if (iteam == 2)
{
copy(team, 3, "CT")
}
else if (iteam == 3)
{
copy(team, 3, "SPE");
iteam = 6;
} else {
iteam = get_user_team(i, team, 3)
}
} else {
iteam = get_user_team(i, team, 3)
}

if ((iteam == g_CSTeamiNumbers[g_menuOption[id] % (g_cstrike ? 3 : 2)]) || (access(i, ADMIN_IMMUNITY | ADMIN_KICK) && !iMainAdmin && i != id))
{
++b

if (g_coloredMenus)
len += format(menuBody[len], 511-len, "\d%d. %s\R%s^n\w", b, name, team)
else
len += format(menuBody[len], 511-len, "#. %s %s^n", name, team)
} else {
keys |= (1<<b)

if (is_user_admin(i))
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*\y\R%s^n\w" : "%d. %s * %s^n", ++b, name, team)
else
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s\y\R%s^n\w" : "%d. %s %s^n", ++b, name, team)
}
}

len += format(menuBody[len], 511-len, "^n8. %L^n", id, "TRANSF_TO", g_CSTeamNames[g_menuOption[id] % (g_cstrike ? 3 : 2)])

if (end != g_menuPlayersNum[id])
{
format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else
format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")

show_menu(id, keys, menuBody, -1, "Team Menu")
}

public cmdTeamMenu(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

g_menuOption[id] = 0

displayTeamMenu(id, g_menuPosition[id] = 0)

return PLUGIN_HANDLED
}

/* Client cmds menu */

public actionClcmdMenu(id, key)
{
switch (key)
{
case 7:
{
++g_menuOption[id]
g_menuOption[id] %= g_menuSelectNum[id]
displayClcmdMenu(id, g_menuPosition[id])
}
case 8: displayClcmdMenu(id, ++g_menuPosition[id])
case 9: displayClcmdMenu(id, --g_menuPosition[id])
default:
{
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new flags = g_clcmdMisc[g_menuSelect[id][g_menuOption[id]]][1]

if (is_user_connected(player))
{
new command[512], authid[32], name[32], userid[32]

copy(command, charsmax(command), g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]])
get_user_authid(player, authid, 31)
get_user_name(player, name, 31)
num_to_str(get_user_userid(player), userid, 31)

replace(command, charsmax(command), "%userid%", userid)
replace(command, charsmax(command), "%authid%", authid)
replace(command, charsmax(command), "%name%", name)

if (flags & 1)
{
server_cmd("%s", command)
server_exec()
} else if (flags & 2)
client_cmd(id, "%s", command)
else if (flags & 4)
client_cmd(player, "%s", command)
}

if (flags & 8)
displayClcmdMenu(id, g_menuPosition[id])
}
}

return PLUGIN_HANDLED
}

displayClcmdMenu(id, pos)
{
if (pos < 0)
return

get_players(g_menuPlayers[id], g_menuPlayersNum[id])

new menuBody[512]
new b = 0
new i
new name[32]
new start = pos * 7

if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0

new len = format(menuBody, 511, g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "CL_CMD_MENU", pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8

new iMainAdmin = get_user_flags(id) & ADMIN_RCON

if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]

for (new a = start; a < end; ++a)
{
i = g_menuPlayers[id][a]
get_user_name(i, name, 31)

if (!g_menuSelectNum[id] || (access(i, ADMIN_IMMUNITY | ADMIN_KICK) && !iMainAdmin && i != id))
{
++b

if (g_coloredMenus)
len += format(menuBody[len], 511-len, "\d%d. %s^n\w", b, name)
else
len += format(menuBody[len], 511-len, "#. %s^n", name)
} else {
keys |= (1<<b)

if (is_user_admin(i))
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*^n\w" : "%d. %s *^n", ++b, name)
else
len += format(menuBody[len], 511-len, "%d. %s^n", ++b, name)
}
}

if (g_menuSelectNum[id])
len += format(menuBody[len], 511-len, "^n8. %s^n", g_clcmdName[g_menuSelect[id][g_menuOption[id]]])
else
len += format(menuBody[len], 511-len, "^n8. %L^n", id, "NO_CMDS")

if (end != g_menuPlayersNum[id])
{
format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else
format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")

show_menu(id, keys, menuBody, -1, "Client Cmds Menu")
}

public cmdClcmdMenu(id, level, cid)
{
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED

g_menuSelectNum[id] = 0

for (new a = 0; a < g_clcmdNum; ++a)
if (access(id, g_clcmdMisc[a][0]))
g_menuSelect[id][g_menuSelectNum[id]++] = a

g_menuOption[id] = 0

displayClcmdMenu(id, g_menuPosition[id] = 0)

return PLUGIN_HANDLED
}

load_settings(szFilename[])
{
if (!file_exists(szFilename))
return 0

new text[256], szFlags[32], szAccess[32]
new a, pos = 0

while (g_clcmdNum < MAX_CLCMDS && read_file(szFilename, pos++, text, 255, a))
{
if (text[0] == ';') continue

if (parse(text, g_clcmdName[g_clcmdNum], 31, g_clcmdCmd[g_clcmdNum], 63, szFlags, 31, szAccess, 31) > 3)
{
while (replace(g_clcmdCmd[g_clcmdNum], 63, "\'", "^""))
{
// do nothing
}

g_clcmdMisc[g_clcmdNum][1] = read_flags(szFlags)
g_clcmdMisc[g_clcmdNum][0] = read_flags(szAccess)
g_clcmdNum++
}
}

return 1
}
Доброго времени суток. В общем, когда через amxmodmenu нажимаешь на "команда игрока" или "Ударить/Убить" меню пропадает, в консоле пишет unnkown command: amx_teammenu. Заходил на другой сервер и писал просто в косноел amx_teammenu - всё работает, меню выскакивает. Что делать?
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу