08.12.2016, 11:46
essa dialog so esta pegando meu nome nao pega de quem tem o level ou kill ou dinheiro ou maior level de procurado
sу pega o meu alguem ajuda ae
sу pega o meu alguem ajuda ae
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;
}
}
}