[Ajuda] Bug do comando
#1

Olб, Eu peguei esse sistema em uma GM, ela tava funcionando mais parou do nada.... quando dou /recorde aparece no chat:
PHP код:
[01:41:36SERVERUnknown command
Cуdigo:
PHP код:
    #define toplevel 800
    
if(strcmp(cmdtext"/recorde"true) == 0) return MostrarRankJFS(playerid); 
No final do GM:

PHP код:
forward MostrarRankJFS(playerid);
public 
MostrarRankJFS(playerid)
{
    new
           
playerScores[MAX_PLAYERS][rankingEnum],
        
index
    
;
    for(new 
i!= MAX_PLAYERS; ++i)
    {
          if(
IsPlayerConnected(i) && !IsPlayerNPC(i))
          {
            
playerScores[index][player_Score] = GetPlayerScore(i);
            
playerScores[index++][player_ID] = i;
        }
    }
    
GetPlayerHighestScores(playerScores0index);
    new
          
score_Text[3000] = "\n",
        
player_Name[MAX_PLAYER_NAME]
    ;
    for(new 
i5; ++i)
    {
           if(
index)
          {
                
GetPlayerName(playerScores[i][player_ID], player_Namesizeof(player_Name));
                 
format(score_Textsizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Lugar -> {0CC6F5}%s {FFFFFF}- Level {00A600}%d"score_Text1player_NameplayerScores[i][player_Score]);
          }
          else
          {
                
format(score_Textsizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Lugar ->  {0CC6F5}Ninguйm"score_Text1);
          }
       }
       
ShowPlayerDialog(playerid5000DIALOG_STYLE_MSGBOX"Top 5{00A600} Level"score_Text"Fechar""");
     return 
true;

-Grato
Reply
#2

Vocк adicionou zcmd ou pawn.cmd no gamemode?
Reply
#3

Para dar esse erro й porque a funзгo MostrarRankJFS estб a retornar false. Deve ter algum errozinho, instale o crashdetect e veja se aparece alguma coisa quando executa o comando.
Reply
#4

Quote:
Originally Posted by bruxo00
Посмотреть сообщение
Para dar esse erro й porque a funзгo MostrarRankJFS estб a retornar false. Deve ter algum errozinho, instale o crashdetect e veja se aparece alguma coisa quando executa o comando.
Jб fiz mais nгo deu nenhum erro !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)