Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Animation problem.

$
0
0
PHP Code:

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 Code:

ApplyAnimation(playerid"KNIFE""KILL_Knife_Ped_Die"4.0011101); 

doesn't apply when the player die :(

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>