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



Unreachable code - GuilhermeW - 03.12.2016

PHP код:
    if(strcmp(cmd"/ColisaoE"true) == 0) < Linha do errosomente essa
    
{
        if(
ColisaoE[playerid] == 0)
        {
        for(new 
eMAX_PLAYERSe++)
        {
        if(
FoiProEvento[playerid] == 1)
        
DisableRemoteVehicleCollisions(etrue);
        
SendClientMessage(playeridCOR_BRANCOXXX"* Colisхes nos veнculos do evento desativadas!");
        
ColisaoE[playerid] = 1;
        return 
1;
        }
        }
        else
        {
        for(new 
eMAX_PLAYERSe++) {
        if(
FoiProEvento[playerid] == 1)
        
DisableRemoteVehicleCollisions(efalse);
        
SendClientMessage(playeridCOR_BRANCOXXX"* Colisхes nos veнculos do evento ativadas!");
        
ColisaoE[playerid] = 0;
        return 
1;
        }
        } 
PHP код:
CM.pwn(56126) : warning 225unreachable code 



Re: Unreachable code - [BOPE]Seu._.Madruga - 03.12.2016

PHP код:
    new ColisaoE 0//No topo do GM

    
if(strcmp(cmd"/ColisaoE"true) == 0//Comando Arrumado.
    
{
        
ColisaoE ColisaoE == ? (1) : (0);
        for(new 
eMAX_PLAYERSe++) {
            if(
FoiProEvento[e] == 1) {
                
DisableRemoteVehicleCollisions(eColisaoE == ? (true) : (false));
                
SendClientMessage(eCOR_BRANCOXXXColisaoE == ? ("* Colisхes nos veнculos do evento desativadas!") : ("* Colisхes nos veнculos do evento ativadas!"));
            }
        }
        return 
1;
    }