PHP Code:
#include <amxmodx>
#include <colorchat>
public plugin_init()
{
register_plugin("PlayerHelp", "2.3.0", "SANJAY");
register_clcmd("say /sin", "ShowMenu", _, "/sin");
register_clcmd( "say_team /sin", "ShowMenu", _, "/sin");
}
public ShowMenu(id)
{
new szTemp[50], szName[33]; get_user_name(id, szName, charsmax(szName))
formatex(szTemp, charsmax(szTemp), "Welcome %s!^n\rPlayer Help \yMy Menu \rBy XYZ", szName)
new menu = menu_create(szTemp, "mh_MyMenu");
menu_additem(menu, "Contact server owner", "", 0); // case 0
menu_additem(menu, "Server ip", "", 0); // case 1
menu_additem(menu, "He Grenade", "", 0); // case 2
menu_additem(menu, "Score Reset", "", 0); // case 3
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public mh_MyMenu(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(id);
return PLUGIN_HANDLED;
}
new command[6], name[64], access, callback;
menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
switch(item)
{
case 0:
{
ColorChat( 0, print_chat, "^4XYZ ^3Server Owner :^4 XYZ");
}
case 1:
{
ColorChat( 0, print_chat, "^4XYZ ^3Server Test ip :^4 sinmix2.ddns.net:27395 ");
}
case 2:
{
client_cmd(id, "hegren");
ColorChat(id, print_chat, "^4You have successfully bought nade :)");
}
case 3: client_cmd(id, "^"say /rs^"");
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}