[Ajuda] O que tem de errado nesses comandos?
#1

Esses dois comandos nгo estгo funcionando, eu digito "/h Teste" e nгo aparece nada, o mesmo ocorre com /ah, agradeзo a quem ajuda.

PHP код:
CMD:h(playeridresult[])
{
    
GetPlayerName(playeridsendernamesizeof(sendername));
    if(
isnull(result))
    {
        
SendClientMessage(playeridCOLOR_GRAD2"USE: (/h ou /hc)helper [helper chat]");
        return 
true;
    }
    if (
PlayerInfo[playerid][pHelper] >= 1)
    {
        new 
string[128];
        
format(stringsizeof(string), "*%d Helper %s: %s"PlayerInfo[playerid][pHelper], sendernameresult);
        
SendHelperMessage(COR_HELPERstring);
        
PLLogs("helperchat"string);
        
printf("Helper %s: %s"sendernameresult);
    }
    return 
true;
}
CMD:ah(playeridresult[])
{
    
GetPlayerName(playeridsendernamesizeof(sendername));
    if(
isnull(result))
    {
        return 
SendClientMessage(playeridCOLOR_GRAD2"USE: (/ah)dmin/helper [admin/helper chat]");
    }
    new 
string[128];
    if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        
format(stringsizeof(string), "*%d Admin %s: %s"PlayerInfo[playerid][pAdmin], sendernameresult);
        
ChatHelperAdmin(COLOR_YELLOW2,string);
        
PLLogs("AdminHelperChat"string);
    }
    else if(
PlayerInfo[playerid][pHelper] >= 1)
    {
        
format(stringsizeof(string)," *%d Helper %s: %s"PlayerInfo[playerid][pHelper], sendernameresult);
        
ChatHelperAdmin(COLOR_YELLOW2string);
        
PLLogs("AdminHelperChat"string);
    }
    return 
1;
}
public 
SendHelperMessage(COLORstriing[])
{
    for(new 
i=1!= MAX_ADMINSi++)
    {
        if(
PlayerInfo[i][pHelper] >= 1)
        {
            
SendClientMessage(iCOLORstriing);
        }
    }
    return 
1;
}
public 
ChatHelperAdmin(COLOR,const striing[])
{
    for(new 
i=1!= MAX_ADMINSi++)
    {
        if(
PlayerInfo[i][pHelper] >= || PlayerInfo[i][pAdmin] >= 1)
        {
            
SendClientMessage(iCOLORstriing);
            
printf("%s"striing);
        }
    }
    return 
1;

Reply
#2

PHP код:
public SendHelperMessage(COLOR, const striing[]) 

    for(new 
i=1!= MAX_PLAYERSi++) 
    { 
        if(
PlayerInfo[i][pHelper] >= 1
        { 
            
SendClientMessage(iCOLORstriing); 
        } 
    } 
    return 
1


public 
ChatHelperAdmin(COLOR, const striing[]) 

    for(new 
i=1!= MAX_PLAYERSi++) 
    { 
        if(
PlayerInfo[i][pHelper] >= || PlayerInfo[i][pAdmin] >= 1
        { 
            
SendClientMessage(iCOLORstriing); 
            
printf("%s"striing); 
        } 
    } 
    return 
1

Reply
#3

Continua bugado mano.
Reply
#4

O cуdigo do Glederson_dom esta quase certo, o ъnico erro que ele nгo arrumou foi a variбvel i comeзar com o valor 1.

Por causa disso caso o seu id for 0 ele nгo irб mostrar a mensagem para vocк.

PHP код:
public SendHelperMessage(COLOR, const striing[])
{
    for(new 
iGetPlayerPoolSize(); <= ji++)
    {
        if(
IsPlayerConnected(i) && PlayerInfo[i][pHelper] >= 1)
        {
            
SendClientMessage(iCOLORstriing);
        }
    }
    return 
1;
}

public 
ChatHelperAdmin(COLOR, const striing[])
{
    for(new 
iGetPlayerPoolSize(); <= ji++)
    {
        if(
IsPlayerConnected(i) && (PlayerInfo[i][pHelper] >= || PlayerInfo[i][pAdmin] >= 1))
        {
            
SendClientMessage(iCOLORstriing);
            
printf("%s"striing);
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)