[Ajuda] warning 225: unreachable code
#1

PHP код:
 public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponid)
{
    if(
Player[damagedid][Reporter] > 0)
    {
        if(
EmTrabalho[damagedid] == 1)
        {
            
GameTextForPlayer(playerid"~r~Nгo AGRIDA UM REPORTER EM TRABALHO!"25003);
        }
    }
    if(
Player[damagedid][pHelper] > 0)
    {
        if(
EmTrabalho[damagedid] == 1)
        {
            
GameTextForPlayer(playerid"~r~Nгo AGRIDA UM HELPER!"25003);
        }
    }
    if(
Player[playerid][Faccoes] == Player[damagedid][Faccoes])
    {
        if(
EmTrabalho[playerid] == 0)
        {
            
GameTextForPlayer(playerid"~r~ Nao agrida alguem da sua organizacao."30005);
        }
    }
    return 
true;
    if (
damagedid != INVALID_PLAYER_ID//aqui esta o warning
    
{
        
PlayerPlaySound(playerid178020.00.00.0);
    }
    return 
true;

Reply
#2

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) 
{ 
    if(Player[damagedid][Reporter] > 0) 
    { 

        if(EmTrabalho[damagedid] == 1) 
        { 

            GameTextForPlayer(playerid, "~r~Nгo AGRIDA UM REPORTER EM TRABALHO!", 2500, 3); 
        } 
    } 
    if(Player[damagedid][pHelper] > 0) 
    { 

        if(EmTrabalho[damagedid] == 1) 
        { 

            GameTextForPlayer(playerid, "~r~Nгo AGRIDA UM HELPER!", 2500, 3); 
        } 
    } 
    if(Player[playerid][Faccoes] == Player[damagedid][Faccoes]) 
    { 

        if(EmTrabalho[playerid] == 0) 
        { 

            GameTextForPlayer(playerid, "~r~ Nao agrida alguem da sua organizacao.", 3000, 5); 
        } 
    } 
    return true; 

    if (damagedid != INVALID_PLAYER_ID) //aqui esta o warning 
    { 

        PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); 
    } 
    return true; 
}
>>

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) 
{ 
    if(Player[damagedid][Reporter] > 0) 
    { 

        if(EmTrabalho[damagedid] == 1) 
        { 

            GameTextForPlayer(playerid, "~r~Nгo AGRIDA UM REPORTER EM TRABALHO!", 2500, 3); 
        } 
    } 
    if(Player[damagedid][pHelper] > 0) 
    { 

        if(EmTrabalho[damagedid] == 1) 
        { 

            GameTextForPlayer(playerid, "~r~Nгo AGRIDA UM HELPER!", 2500, 3); 
        } 
    } 
    if(Player[playerid][Faccoes] == Player[damagedid][Faccoes]) 
    { 

        if(EmTrabalho[playerid] == 0) 
        { 

            GameTextForPlayer(playerid, "~r~ Nao agrida alguem da sua organizacao.", 3000, 5); 
        }
        return true; 
    } 
    

    if (damagedid != INVALID_PLAYER_ID) //aqui esta o warning 
    { 

        PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); 
    } 
    return true; 
}
Reply
#3

ah ?
Reply
#4

Quote:
Originally Posted by didimk157
Посмотреть сообщение
ah ?
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponid

    if(
Player[damagedid][Reporter] > 0
    { 
        if(
EmTrabalho[damagedid] == 1
        { 
            
GameTextForPlayer(playerid"~r~Nгo AGRIDA UM REPORTER EM TRABALHO!"25003); 
        } 
    } 
    if(
Player[damagedid][pHelper] > 0
    { 
        if(
EmTrabalho[damagedid] == 1
        { 
            
GameTextForPlayer(playerid"~r~Nгo AGRIDA UM HELPER!"25003); 
        } 
    } 
    if(
Player[playerid][Faccoes] == Player[damagedid][Faccoes]) 
    { 
        if(
EmTrabalho[playerid] == 0
        { 
            
GameTextForPlayer(playerid"~r~ Nao agrida alguem da sua organizacao."30005); 
        }
        return 
true//ELE COLOCOU AQUI AGORA ESTБ CERTO!
    

    
   
//o RETURN TRUE ESTAVA AQUI
    
if (damagedid != INVALID_PLAYER_ID//aqui esta o warning 
    

        
PlayerPlaySound(playerid178020.00.00.0); 
    } 
    return 
true
Reply
#5

ata vlw vou testar aq
Reply
#6

vlw resolvido
Reply
#7

Quote:
Originally Posted by didimk157
Посмотреть сообщение
vlw resolvido
Nгo faзa Double post, Edite o mesmo! que tinha comentado!

@OFF
se quiser ajuda add skype

Jnribeiro51
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)