SA-MP Forums Archive
[Ajuda] Tag mismatch - 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] Tag mismatch (/showthread.php?tid=623724)



Tag mismatch - GuilhermeW - 04.12.2016

PHP код:
if(strcmp(cmd, "/ColisaoE", true) == 0)
{
    
    if(
ColisaoEVar[playerid] == false) Linha 15865
    
{
        
        for(new 
i; i < MAX_PLAYERS; i++)
        {
            
            
ColisaoEVar[playerid] = true;
            
SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento desativadas!");
            
DisableRemoteVehicleCollisions(i, true);
            return 
1;
        }
    }
    else if(
ColisaoEVar[playerid] == true) Linha 15877
    
{
        for(new 
i; i < MAX_PLAYERS; i++)
        {
        
ColisaoEVar[playerid] = false;
        
SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento ativadas!");
        
DisableRemoteVehicleCollisions(i, false);
        return 
1;
        }
    }
    return 
1;
} 



Re: Tag mismatch - Yaa - 04.12.2016

PHP код:
if(strcmp(cmd, "/ColisaoE", true) == 0) 
{ 
     
    if(!
ColisaoEVar[playerid]) 
    { 
         
        for(new 
i; i < MAX_PLAYERS; i++) 
        { 
             
            
ColisaoEVar[playerid] = 0; 
            
SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento desativadas!"); 
            
DisableRemoteVehicleCollisions(i, true); 
            return 
1; 
        } 
    } 
    else if(
ColisaoEVar[playerid])
    { 
        for(new 
i; i < MAX_PLAYERS; i++) 
        { 
        
ColisaoEVar[playerid] = 1; 
        
SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento ativadas!"); 
        
DisableRemoteVehicleCollisions(i, false); 
        return 
1; 
        } 
    } 
    return 
1; 
} 



Re: Tag mismatch - GuilhermeW - 04.12.2016

Nгo funcionou, o comando nem chega a enviar a mensagem, o comando atй vai, porйm, nгo resulta em nada.


Re: Tag mismatch - Marllun - 04.12.2016

Код:
CMD:ColisaoE(playerid)
{
        if(ColisaoEVar[playerid] == 0)
	{

		for(new i; i < MAX_PLAYERS; i++)
		{

			ColisaoEVar[playerid] = true;
			SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento desativadas!");
			DisableRemoteVehicleCollisions(i, true);
			return 1;
		}
	}
	else if(ColisaoEVar[playerid] == 1) 
	{
		for(new i; i < MAX_PLAYERS; i++)
		{
			ColisaoEVar[playerid] = false;
			SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento ativadas!");
			DisableRemoteVehicleCollisions(i, false);
			return 1;
		}
	}
	return 1;
}
kkkk eu fiz isso ai sу que nгo deu erro testa ai parsa.


Re: Tag mismatch - GuilhermeW - 04.12.2016

strcmp


Re: Tag mismatch - Marllun - 04.12.2016

Код:
if(strcmp(cmd, "/ColisaoE", true) == 0) 
{ 
     
    if(ColisaoEVar[playerid] == 0) 
    { 
         
        for(new i; i < MAX_PLAYERS; i++) 
        { 
             
            ColisaoEVar[playerid] = true; 
            SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento desativadas!"); 
            DisableRemoteVehicleCollisions(i, true); 
            return 1; 
        } 
    } 
    else if(ColisaoEVar[playerid] == 1)
    { 
        for(new i; i < MAX_PLAYERS; i++) 
        { 
        ColisaoEVar[playerid] = false; 
        SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento ativadas!"); 
        DisableRemoteVehicleCollisions(i, false); 
        return 1; 
        } 
    } 
    return 1; 
}



Re: Tag mismatch - GuilhermeW - 04.12.2016

Nгo tб indo, tipo a colisгo sу tб desabilitando pra um jogador, e nгo pra todos, como eu faзo isso?


Re: Tag mismatch - Marllun - 04.12.2016

Код:
if(strcmp(cmd, "/ColisaoE", true) == 0)
{

	if(ColisaoEVar[playerid] == 0)
	{
                for(new i; i < MAX_PLAYERS; i++)
		{

			ColisaoEVar[playerid] = true;
			SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento desativadas!");
			DisableRemoteVehicleCollisions(i, true);
			return 1;
		}
 	}
	else
	{

 		for(new i; i < MAX_PLAYERS; i++)
		{
			ColisaoEVar[playerid] = false;
			SendClientMessage(playerid, COR_BRANCOXXX, "* Colisхes nos veнculos do evento ativadas!");
			DisableRemoteVehicleCollisions(i, false);
			return 1;
		}

	}
	return 1;
}
testa ai


Re: Tag mismatch - MBJ - 04.12.2016

PHP код:
if(strcmp(cmd, "/ColisaoE", true) == 0) 
{ 
    for(new 
i; i < MAX_PLAYERS; i++)
    {
        if(
ColisaoEVar[i] == 0) 
        {             
            
ColisaoEVar[i] = 1; 
            
SendClientMessage(i, COR_BRANCOXXX, "* Colisхes nos veнculos do evento desativadas!"); 
            
DisableRemoteVehicleCollisions(i, true); 
            return 
1; 
        } 
        else if(
ColisaoEVar[i] == 1)
        { 
            
ColisaoEVar[i] = 0; 
            
SendClientMessage(i, COR_BRANCOXXX, "* Colisхes nos veнculos do evento ativadas!"); 
            
DisableRemoteVehicleCollisions(i, false); 
            return 
1; 
        } 
    } 
    return 
1; 
} 
Caso de o erro "Tag Mismatch" nas linhas onde tem ColisaoEVar substitua os 0 e 1 por true e false


Re: Tag mismatch - GuilhermeW - 04.12.2016

Nгo tб desativando para geral, apenas para quem digitou, deixa isso daн quieto kkkk