Hi how to make so when you select the menu were issued the weapon for himself?
How to do if a player in the hands of ak 47 then give him extra health?
Sorry for the bad English I used the translator.
Code:
#include <sourcemod>
public OnPluginStart()
{
RegConsoleCmd("wepmen", wepmen);
}
public Action:wepmen(client, args)
{
if (client > 0 && args < 1) ShowMyMenu(client);
return Plugin_Handled;
}
public Action:wepmen(client, args)
{
if (client > 0 && args < 1) ShowMyPanel(client);
return Plugin_Handled;
}
ShowMyPanel(client)
{
new Handle:panel = CreatePanel();
SetPanelTitle(panel, "Животные:\n \n");
DrawPanelItem(panel, "AK47");
DrawPanelItem(panel, "Выход");
SendPanelToClient(panel, client, Select_Panel, 0);
CloseHandle(panel);
ClientCommand(client, "playgamesound items/nvg_off.wav");
}
public Select_Panel(Handle:panel, MenuAction:action, client, option)
{
if (action == MenuAction_Select)
{
PrintToChat(client, "%d", option);
if (option < 2) ShowMyPanel(client);
}
}