Всем привет, не подскажите чего не хочет меню открываться
C++:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>
#define PLUGIN "[JB]Med sestra"
#define VERSION "1.0"
#define AUTHOR "Nixon"
new Round1[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1)
register_concmd("res", "SpawnPlayer");
}
public Spawn_player(id)
{
set_rendering(id,kRenderFxNone,255,255,255,kRenderNormal,16)
}
public SpawnPlayer(id)
{
new i_Menu = menu_create("\wВыбири Игрока", "menu_handler")
new s_Players[32], i_Num, i_Player, msg[222]
new s_Name[32], s_Player[10]
for (new i; i < i_Num; i++)
{
i_Player = s_Players[i]
get_user_name(i_Player, s_Name, charsmax(s_Name))
num_to_str(i_Player, s_Player, charsmax(s_Player))
if(is_user_alive(i_Player))
{
formatex(msg, charsmax(msg), "\d%s (\rЖивой\d)", s_Name)
menu_additem(i_Menu, msg, s_Player, 0)
}
else
{
formatex(msg, charsmax(msg), "%s", s_Name)
menu_additem(i_Menu, msg, s_Player, 0)
}
menu_setprop(i_Menu, MPROP_NEXTNAME, "Дальше")
menu_setprop(i_Menu, MPROP_BACKNAME, "Назад")
menu_setprop(i_Menu, MPROP_EXITNAME, "Закрыть")
}
menu_display(id, i_Menu, 0)
}
public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new s_Data[6], s_Name[64], i_Access, i_Callback
menu_item_getinfo(menu, item, i_Access, s_Data, charsmax(s_Data), s_Name, charsmax(s_Name), i_Callback)
new i_Player = str_to_num(s_Data)
new name[32]
get_user_name(id, name, 31)
new name2[32]
get_user_name(i_Player, name2, 31)
if(id == i_Player)
{
}
else
{
ExecuteHam(Ham_CS_RoundRespawn, i_Player)
client_print_color(id, print_team_red, "^1[^4Система^1] Админ ^3%s ^4воскресил ^3%s", name, name2)
}
menu_destroy(menu)
return PLUGIN_HANDLED
}