Hello ! Im newbie in scripting
So i need pros help
I made this (somehove its works)
Code:
public OnPluginStart()
{
RegAdminCmd("mix",
Command_mix,
ADMFLAG_ROOT,
"Mix meniu");
}
public PanelHandler1(Handle:menu, MenuAction:action, param1, param2)
{
if (action == MenuAction_Select)
{
PrintToConsole(param1, "You selected item: %d", param2);
} else if (action == MenuAction_Cancel) {
PrintToServer("Client %d's menu was cancelled. Reason: %d", param1, param2);
}
}
public Action:Command_mix(client, args)
{
new Handle:panel = CreatePanel();
SetPanelTitle(panel, "Mix Menu");
DrawPanelItem(panel, "Yes");
DrawPanelItem(panel, "No");
SendPanelToClient(panel, client, PanelHandler1, 20);
CloseHandle(panel);
return Plugin_Handled;
}
So what i want is commands
if you can see its from wiki
So i whant to add commands but i dont know how.
When i write !mix in chat the menu shows up and there is 2 choises "Yes" and "No"
How to add commands like "Restart" "Live" and more ?
(Sorry for bad english)