SA-MP Forums Archive
[Ajuda] /recorde - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /recorde (/showthread.php?tid=662435)



/recorde - DeusGrego - 01.01.2019

Olб pessoal tudo bem? primeiramente Feliz 2019.

Entгo tф com problema no /recorde que й o sistema de rank de level.
Ele ta dando erro. que o nick do jogador nгo bate com o level do mesmo..

PHP код:
if(!strcmp(cmdtext"/recorde"true))
    {
    new 
Scor[MAX_PLAYERS];
    for(new 
i!= MAX_PLAYERS; ++iScor[i] = GetPlayerScore(i);
     
BubbleSort(Scorsizeof(Scor));
    for(new 
i!= 1i++)
     {
          
format(stringsizeof(string),"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recorde ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        
SendClientMessage(playeridVerdestring);
         
format(stringsizeof(string),"~> O jogador conectado com o level mais alto й: %s (ID %d) (Level: %d)."PlayerName(i),i,Scor[i]);
         
SendClientMessage(playeridBrancostring);
         
format(stringsizeof(string),"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recorde ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
         
SendClientMessage(playeridVerdestring);
          
      }
       return 
1;
    } 
- Grato


Re: /recorde - Felipealves - 01.01.2019

PHP код:
CMD:record(playerid){
    new 
Scor[MAX_PLAYERS], maioridmaiorstring[128]; 
    for(new 
i!= MAX_PLAYERS; ++i){
        
Scor[i] = GetPlayerScore(i);
        if(
Scor[i] > maior){
            
maior Scor[i];
            
idmaior i;
        }
    }
    
SendClientMessage(playerid, -1"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recorde ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 
    
format(stringsizeof(string),"~> O jogador conectado com o level mais alto й: %s (ID %d) (Level: %d)."ReturnPlayerName(idmaior), idmaiormaior); 
    
SendClientMessage(playerid, -1string);
    
SendClientMessage(playerid, -1"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recorde ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 
    return 
1