Пользователь
- Сообщения
- 68
- Реакции
- 0
Код:
public Cmd_XPList(id, iLevel, iCid)
{
if(!cmd_access(id, iLevel, iCid, 1))
{
return PLUGIN_HANDLED
}
new szTitle[128]
formatex(szTitle, charsmax(szTitle), "%L", id, "CRXRANKS_MENU_TITLE")
new iPlayers[MAX_PLAYERS], iPnum, iMenu = menu_create(szTitle, "XPList_Handler")
get_players(iPlayers, iPnum); SortCustom1D(iPlayers, iPnum, "sort_players_by_xp")
for(new szItem[128], szName[MAX_NAME_LENGTH], iPlayer, i; i < iPnum; i++)
{
iPlayer = iPlayers[i]
get_user_name(iPlayer, szName, charsmax(szName))
formatex(szItem, charsmax(szItem), "%L", id, "CRXRANKS_ITEM_FORMAT", g_ePlayerData[iPlayer][XP], szName, g_ePlayerData[iPlayer][Level], g_ePlayerData[iPlayer][Rank])
menu_additem(iMenu, szItem)
}
client_cmd(id,"spk ^"/events/friend_died^"")
menu_display(id, iMenu)
return PLUGIN_HANDLED
}
Заранее спасибо, если кто даст совет или поможет.