Örnek olarak bu, dediğini de yaparım.
Kod:
/* Sublime AMXX Editor v2.2 */
#include <amxmodx>
#include <csstats>
public plugin_init()
{
register_clcmd("say /rankbilgim","rankbilgi")
}
public rankbilgi(id) {
static Item[64]
new eaStats[8],eaBHits[8],data[8]
get_user_stats(id,eaStats,eaBHits);
formatex(Item, charsmax(Item),"\rRank Bilgileri")
new Menu = menu_create(Item, "rankmenu_devam")
formatex(Item, charsmax(Item),"\wSiralaman - \y[ \r%i \y]",get_user_stats(id,data,data))
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item),"\wOldurdugun - \y[ \r%i \y]",eaStats[0],eaBHits[1])
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item),"\wOldugun - \y[ \r%i \y]",eaStats[1],eaBHits[1])
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item),"\wHSler - \y[ \r%i \y]",eaStats[2],eaBHits[1])
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item),"\wTKlar - \y[ \r%i \y]",eaStats[3],eaBHits[1])
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item),"\wToplam Vurus - \y[ \r%i \y]",eaStats[6],eaBHits[1])
menu_additem(Menu, Item, "1")
formatex(Item, charsmax(Item), "\wCikis")
menu_setprop(Menu,MPROP_EXITNAME,Item)
menu_display(id, Menu,0)
}
public rankmenu_devam(id, menu, item) {
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:{
rankbilgi(id)
}
}
return PLUGIN_HANDLED
}