21.07.2018, 05:11
Olб, Eu peguei esse sistema em uma GM, ela tava funcionando mais parou do nada.... quando dou /recorde aparece no chat:
Cуdigo:
No final do GM:
-Grato
PHP код:
[01:41:36] SERVER: Unknown command.
PHP код:
#define toplevel 800
if(strcmp(cmdtext, "/recorde", true) == 0) return MostrarRankJFS(playerid);
PHP код:
forward MostrarRankJFS(playerid);
public MostrarRankJFS(playerid)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[3000] = "\n",
player_Name[MAX_PLAYER_NAME]
;
for(new i; i < 5; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Lugar -> {0CC6F5}%s {FFFFFF}- Level {00A600}%d", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
}
else
{
format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Lugar -> {0CC6F5}Ninguйm", score_Text, i + 1);
}
}
ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_MSGBOX, "Top 5{00A600} Level", score_Text, "Fechar", "");
return true;
}