SA-MP Forums Archive
[Ajuda] Animaзгo na morte - 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] Animaзгo na morte (/showthread.php?tid=601632)



Animaзгo na morte - B4z3ll - 23.02.2016

Queria saber como faзo para colocar um anime quando o cara morre. Tipo este:

https://www.youtube.com/watch?v=oUBwArCln1w Parte 0:33 ele morre.

O anime jб sei qual й, sу quero saber em qual callback eu coloco ele.

Tentei:

Код:
No givedamage.
if(HP == 0) e < 1)
Nгo adianta.


Re: Animaзгo na morte - LockedLucas - 23.02.2016

tente na OnPlayerDeath


Re: Animaзгo na morte - B4z3ll - 24.02.2016

Quote:
Originally Posted by LockedLucas
Посмотреть сообщение
tente na OnPlayerDeath
Jб tentei mano, porйm ele efetua uma animaзгo de queda antes da que eu quero.


Re: Animaзгo na morte - LucasMts - 24.02.2016

Mano OnPlayerDeath coloque a animaзгo Death e quando ele morre


Re: Animaзгo na morte - RodrigoMSR - 24.02.2016

Tente isso:

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
    new 
Float:health;
    
GetPlayerHealth(playeridhealth);
    if(
health <= 1.1 || (health amount) <= 1.0)
    {
        if(
health == 1.1) return SetPlayerHealth(playerid1.1);
        
//>>>> Animaзгo aqui <<<<
        
ResetPlayerWeapons(playerid);
        
SetPlayerHealth(playerid1.1);
        
SetPlayerArmour(playerid0);
        
SetPlayerDrunkLevel(playerid5001);
        
OnPlayerDeath(playeridissueridweaponid);
        
SetTimerEx("Spawn"4000false"i"playerid);
    }
    return 
1;
}
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    if(
hittype == BULLET_HIT_TYPE_PLAYER)
    {
        new 
Float:health;
        
GetPlayerHealth(hitidhealth);
        if(
health <= 1.1) return 0;
    }
    return 
1;
}
forward Spawn(playerid);
public 
Spawn(playerid) return ClearAnimations(playerid), SetPlayerDrunkLevel(playerid0), SpawnPlayer(playerid);