10.12.2016, 09:23
bom eu fiz esse codigo aki mais um cara falou que isso nao й um rank alguem pode me ajudar a transformar em um ?
PHP код:
dcmd_rank(playerid, params [])
{
#pragma unused params
if(Player[playerid][pLogged] == false)
return SendClientMessage(playerid, COR_ERRO, "ERRO: Vocк nгo estб logado para utilizar este comando!");
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_LIST,"{1D4FC4}» {ffffff}Top Players On-line", "{1D4FC4}» {ffffff}kills\n{1D4FC4}» {ffffff}Score\n{1D4FC4}» {ffffff}money\n{1D4FC4}» {ffffff}Mais Procurados\n{1D4FC4}", "Selecionar","Cancelar");
return 1;
}
PHP код:
if(dialogid == 9999)
{
if(response) //Ao Clickar no primeiro botгo
{
if(listitem == 0) //Kills
{
new string[128], name[24];
for ( new i = 0; i < MAX_PLAYERS; i++ )
{
if(topKill < Player[i][pMatou]) {
topKill = Player[i][pMatou];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), " {00FF00}%s{FF5A00} | Kills: %i",name, topKill);
}
}
ShowPlayerDialog(playerid, D_Rank, DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Kills ",string,"ok","Voltar");
return 1;
}
if(listitem == 1) // Score
{
new string[128], info[2048], name[24];
for ( new i = 0; i < MAX_PLAYERS; i++ )
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), " {00FF00}%s{FF5A00} | score: %i",name, GetPlayerScore(playerid));
strcat(info, string);
ShowPlayerDialog(playerid, D_Rank+1, DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Scores ",info,"ok","Voltar");
return 1;
}
if(listitem == 2) //Money
{
new string[128], info[2048], name[24];
for ( new i = 0; i < MAX_PLAYERS; i++ )
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), " {00FF00}%s{FF5A00} | Dinheiro: %i",name, GetPlayerMoney(playerid));
strcat(info, string);
ShowPlayerDialog(playerid, D_Rank+2, DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Scores ",info,"ok","Voltar");
return 1;
}
if(listitem == 3) //Mais Procurado
{
new string[128], info[2048], name[24];
for ( new i = 0; i < MAX_PLAYERS; i++ )
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), " {00FF00}%s{FF5A00} | Nivel de procurado: %i",name, GetPlayerWantedLevel(playerid));
strcat(info, string);
ShowPlayerDialog(playerid, D_Rank+3, DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Scores ",info,"ok","Voltar");
return 1;
}
}
}