problema na dialog -
didimk157 - 08.12.2016
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
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;
}
}
}
Re: problema na dialog -
didimk157 - 08.12.2016
Alguem ??
Re: problema na dialog -
AuhMaru - 08.12.2016
O seu cуdigo nгo й um ranking, mas irб mostrar tds as informaзoes dos players:
Comando:
PHP код:
CMD:infos(playerid)
{
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_LIST, "Escolha:", "Kills\nScore\nProcurados", "Ok", "Fechar");
return true;
}
OnDialogResponse:
PHP код:
if(dialogid == 9999)
{
if(response)
{
new str[95];
if(listitem == 0) {
for(new i; i <= GetPlayerPoolSize(); i ++) {
if(IsPlayerConnected(i)) {
format(str, sizeof str, "%s{00FF00}%s {FF5A00}| Kills: %d\n", str, GetName(i), Player[i][pMatou]);
}
}
ShowPlayerDialog(playerid, D_Rank+1, DIALOG_STYLE_MSGBOX, "{FF0000}» {FFFFFF}Rei dos Kills", str, "Fechar", "");
}
if(listitem == 1) {
for(new i; i <= GetPlayerPoolSize(); i ++) {
if(IsPlayerConnected(i)) {
format(str, sizeof str, "%s{00FF00}%s {FF5A00}| Score: %d\n", str, GetName(i), GetPlayerScore(i));
}
}
ShowPlayerDialog(playerid, D_Rank+2, DIALOG_STYLE_MSGBOX, "{FF0000}» {FFFFFF}Rei dos Scores", str, "Fechar", "");
}
if(listitem == 2) {
for(new i; i <= GetPlayerPoolSize(); i ++) {
if(IsPlayerConnected(i)) {
format(str, sizeof str, "%s{00FF00}%s{FF5A00} | Nivel de procurado: %d\n", str, GetName(i), GetPlayerWantedLevel(i));
}
}
ShowPlayerDialog(playerid, D_Rank+3, DIALOG_STYLE_MSGBOX, "{FF0000}» {FFFFFF}Mais Procurado", str, "Fechar", "");
}
}
}
Stock:
PHP код:
GetName(playerid) {
static nickplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, nickplayer, sizeof nickplayer);
return nickplayer;
}
Re: problema na dialog -
didimk157 - 08.12.2016
Pq n e um rank tem como transformar em um ?
Re: problema na dialog -
didimk157 - 09.12.2016
em pq isso n e um rank oq fiz de errado pode ajudar ??