Animation problem.
#1

PHP код:
makePlayerDying(playerid) {
    if(
isPlayerDying(playerid)) {
        
finishDying(playerid);
        
putPlayerInHospital(playerid);
        return 
1;
    }
    if(
GetPVarType(playerid"MedicTimer") == PLAYER_VARTYPE_NONE) {
        new 
Timer:timer repeat medicDeathTimer(playerid);
        
SetPVarInt(playerid"MedicTimer"_:timer);
    }
    
GameTextForPlayer(playerid"~r~Injured.~n~~w~Do /accept death or /service EMS",80005);
    
loadSpecDetails(playerid);
    
ApplyAnimation(playerid"KNIFE""KILL_Knife_Ped_Die"4.0011101);
    
SetPlayerHealthEx(playerid98.0);
    return 
0;
}
revivePlayer(playerid) {
    new 
Timer:timer Timer:GetPVarInt(playerid"MedicTimer");
    
stop timer;
    new 
Float:HP;
    
GetPlayerHealth(playeridHP);
    if(
HP 15.0) {
        
HP 15.0;
    } else {
        
HP += 15.0;
    }
    
SetPlayerHealthEx(playeridHP);
    
ClearAnimations(playerid);
    
TogglePlayerControllableEx(playerid1);
    
DeletePVar(playerid"MedicTimer");

For some reason this animation
PHP код:
ApplyAnimation(playerid"KNIFE""KILL_Knife_Ped_Die"4.0011101); 
doesn't apply when the player die
Reply
#2

On somewhere in your script
Код:
PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
And now on player connect
Код:
PreloadAnimLib(playerid,"KNIFE");
It's a SA-MP bug tho, That animations for the first time don't work
Reply
#3

Or it is because you've set the display time to 0 milliseconds?
Reply
#4

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
On somewhere in your script
Код:
PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
And now on player connect
Код:
PreloadAnimLib(playerid,"KNIFE");
It's a SA-MP bug tho, That animations for the first time don't work
ye bro i have that problem animations dont work in the first time !
Reply
#5

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
On somewhere in your script
Код:
PreloadAnimLib(playerid, animlib[])
{
    ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
And now on player connect
Код:
PreloadAnimLib(playerid,"KNIFE");
It's a SA-MP bug tho, That animations for the first time don't work
I already have that in my script though.. still doesn't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)