[Ajuda] Som do sino e Outro
#1

1є: O som do sino sгo ta saindo quando o player acerta o tiro no outro player.

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid) //coloquei no TakeDamage tmb e nada...
{
    PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0);
    return 1;
}
2є: Antes o GM tinha script de Tiro na SKIN, ai eu tirei e parece que o GM nгo tб reconhecendo quando o player atira no outro... Obs: O dano й causado tudo normal, sai colete e life quando atira no lag normal, mas nгo tб reconhecendo isso!

pawn Код:
public OnPlayerTakeDamage(playerid,issuerid,Float:amount,weaponid)
{
    if(Lagduel[playerid] == false) return 1;
    if(weaponid == 24) amount = 32;
    SetPlayerScore(issuerid,GetPlayerScore(issuerid) + floatround(amount) / 10);
//  PlayerPlaySound(playerid,6401,0,0,0);
    PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); //da tiro
    new Float:life;
    GetPlayerHealth(playerid,life);
    if((life - amount) <= 0)
    {
        Morto[playerid] = true;
        SendDeathMessage(issuerid,playerid,weaponid);
        DeadPlayer(playerid,issuerid,weaponid);
    }
    return 1;
}
   

public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
    if(Aj[playerid] == false && GetPlayerSpecialAction(playerid) == 2) return SetPlayerHealth(playerid,0);
    switch(weaponid)
    {
        case 24: amount = 32;
        case 9: amount = 10;
        case 38: amount = 0;
    }
    if(Morto[damagedid] == true) return 1;
    if(Lagduel[damagedid] == false) return 1;
//  PlayerPlaySound(damagedid,6401,0,0,0); //recebe tiro
    PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); //da tiro
    new Float:Life, Float:Coleete, Float:Dano;
    GetPlayerArmour(damagedid,Coleete);
    GetPlayerHealth(damagedid,Life);
    if(Coleete > 0)
    {
        if(amount > Coleete)
        {
            Dano = amount - Coleete;
            Life = Life - Dano;
            SetPlayerArmour(damagedid, 0.0);
            SetPlayerHealth(damagedid, Life);
            SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 10);
            return 1;
        }
        SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 10);
        Coleete = Coleete - amount;
        SetPlayerArmour(damagedid, Coleete);
    }
    if(Coleete < 1)
    {
        Life = Life - amount;
        SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 10);
        SetPlayerHealth(damagedid, Life);
        if(Life <= 0)
        {
            Morto[damagedid] = true;
            SendDeathMessage(playerid,damagedid,weaponid);
            DeadPlayer(damagedid,playerid,weaponid);
        }
    }
    return 1;
}
NOTA: Eu tirei o SetPlayerTeam pro GM ficar com tiro no LAG normal, entгo acho que esse codigo acima nгo vai ter efeito
Reply


Messages In This Thread
Som do sino e Outro - by †♥† - 06.10.2013, 15:27
Re: Som do sino e Outro - by †♥† - 07.10.2013, 00:11
Re: Som do sino e Outro - by PT - 07.10.2013, 00:15
Re: Som do sino e Outro - by †♥† - 07.10.2013, 00:31
Re: Som do sino e Outro - by Samuel300 - 07.10.2013, 00:45
Re: Som do sino e Outro - by †♥† - 07.10.2013, 01:11
Re: Som do sino e Outro - by Samuel300 - 07.10.2013, 01:19
Re: Som do sino e Outro - by †♥† - 07.10.2013, 01:21
Respuesta: Re: Som do sino e Outro - by ViniKuliveguisky - 07.10.2013, 01:51
Re: Respuesta: Re: Som do sino e Outro - by Samuel300 - 07.10.2013, 02:15
Re: Respuesta: Re: Som do sino e Outro - by shittt - 07.10.2013, 02:50
Re: Som do sino e Outro - by Schocc - 07.10.2013, 02:51
Re: Som do sino e Outro - by shittt - 07.10.2013, 02:57
Re: Som do sino e Outro - by †♥† - 07.10.2013, 13:50
Re: Som do sino e Outro - by RuanRider - 07.10.2013, 13:55
Re: Som do sino e Outro - by †♥† - 07.10.2013, 14:15
Re: Som do sino e Outro - by Samuel300 - 07.10.2013, 18:06
Re: Som do sino e Outro - by †♥† - 07.10.2013, 20:20
Re: Som do sino e Outro - by PT - 07.10.2013, 20:22
Re: Som do sino e Outro - by †♥† - 07.10.2013, 21:09
Re: Som do sino e Outro - by PT - 07.10.2013, 21:15
Re: Som do sino e Outro - by †♥† - 08.10.2013, 00:15

Forum Jump:


Users browsing this thread: 5 Guest(s)