"bug" ao morrer
#1

Alguйm sabe me dizer como arrumar isso?
quando meu boneco morre ele faz uma animaзгo de morte, depois ele spawn e faz outra animaзгo de morte.

https://*********/RHArwpaSOXc
Reply
#2

Codigo?
Reply
#3

public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason);
new Random = random(sizeof(RandomSpawns));
SetPlayerInterior(playerid, 10);
SetPlayerSkin(playerid, 230);
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);
return 1;
}
Reply
#4

Do OnPlayerSpawn.
Reply
#5

Um amigo meu conseguiu me ajudar aqui.
tem discord, pedro?
Reply
#6

Sim mas n lembro qual й. Tou pelo celular agora
Reply
#7


Coloquei isso que um amigo me mandou.
Reply
#8

Quote:
Originally Posted by txrrrr
View Post

Coloquei isso que um amigo me mandou.
Ou voce poderia as instruзoes da stock em onPlayerSpawn.
Reply
#9

tem discord, pedro?
Reply
#10

Se nгo der certo use esse comando antes de mandar o player para o spawn.

PHP Code:
ClearAnimations(playerid); 
Tbm troque seu SetTimer para SetTimerEx.

PHP Code:
public OnPlayerDeath(playeridkilleridreason)
{
    
SendDeathMessage(killerid,playerid,reason);
    
SetTimerEx("MorreuSpawnou"2000false"i"playerid);
    return 
1;
}
public 
MorreuSpawnou(playerid)
{
    new 
Random random(sizeof(RandomSpawns));
    
ClearAnimations(playerid);
    
SetPlayerInterior(playerid10);
    
SetPlayerSkin(playerid230);
    
SetPlayerPos(playeridRandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    
SetPlayerFacingAngle(playeridRandomSpawns[Random][3]);
    return 
1;

Reply
#11

Porque vocк estб setando a posiзгo do jogador apуs ele morrer? Sem nexo. Vocк deveria й setar o SpawnInfo e assim que ele respawnar ele irб para lб, se esse for o objetivo.
Reply
#12

Quote:

Porque vocк estб setando a posiзгo do jogador apуs ele morrer? Sem nexo. Vocк deveria й setar o SpawnInfo e assim que ele respawnar ele irб para lб, se esse for o objetivo.

Sim, falei isso em algum post atras, que tbm o SetPlayerPos nгo da no OnPlayerDeath apenas SpawnInfo. O Meu da certo tirando as animaзгo dps que morre e colocando SpawnInfo.
Reply
#13

Consegui resolver galera, obrigado!
@AutoMatic2 tem discord?
Reply
#14

Quote:

Consegui resolver galera, obrigado!
@AutoMatic2 tem discord?

Yes!

Augusto
#4330
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)