[Ajuda] ajuda nesse codigo rapidao
#1

Como usar essa funзao nesse codigo aki Player[playerid][Matou] pra qm n sabe essa funзao pega as kills dos players mais eu n sei como colocar ela aki no codigo

PHP код:
if(listitem == 0) //Kills
            
{
            new 
string[128], info[2048], name[24];
            for(new 
i; i < MAX_PLAYERS; i++)
            
GetPlayerName(playerid, name, 24);
               
format(string, sizeof(string), " {00FF00}%s{FF5A00} | Kill: %i",name, (playerid));
            
strcat(info, string);
            
ShowPlayerDialog(playerid, D_Rank, DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Kills ",info,"ok","Voltar");
            return 
1;
            } 
Reply
#2

Faзa um loop nos players online verificando os kills de cada um, ex:

PHP код:
new topKill;
for(new 
i; i < MAX_PLAYERS; i++) {
    if(
topKill < Player[i][Matou]) topKill = Player[i][Matou];
} 
ps: isso й uma base para pegar apenas o player que tem o maior kill, adapte para seu sistema
Reply
#3

PHP код:
 if(listitem == 0) //Kills
            
{
            for(new 
i; i < MAX_PLAYERS; i++)
            {
            if(
topKill < Player[playerid][pMatou]) topKill = Player[playerid][pMatou];
            }
            new 
string[128], info[2048], name[24];
            
GetPlayerName(playerid, name, 24);
               
format(string, sizeof(string), " {00FF00}%s{FF5A00} | Kill: %i",name, (playerid));
            
strcat(info, string);
            
ShowPlayerDialog(playerid, D_Rank, DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Kills ",info,"ok","Voltar");
            return 
1;
            } 
Reply
#4

PHP код:
if(listitem == 0) //Kills
{
    new 
string[128], name[24];
    for(new 
i; i < MAX_PLAYERS; i++)
    {
        if(
topKil < Player[i][pMatou]) {
            
topKill = Player[i][pMatou];
            
GetPlayerName(playerid, name, sieof(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;
} 
Reply


Forum Jump:


Users browsing this thread: