Animation help, freeze player.
#1

I put this code:
Код:
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 1, 1, 1, 1, 1);
How can I freeze the player...?
Reply
#2

I didnt understand you, but i think you meant this:

pawn Код:
TogglePlayerControllable(playerid,0);
this freezes the player.
Reply
#3

I don't see why you would want to freeze a player during an animation as most animations manually freeze the player, and if you were to use TogglePlayerControllable the player's will not move, granted, but they also will not be able to look around on their screen.
Reply
#4

Listen, when I apply the animation on the player he's still able to move by attacking or gettin into a car.
But when I freeze him, the animation goes away and he stands up.
Reply
#5

Okay nevermind got it working.
Reply
#6

Use the parameters in ApplyAnimation.
Reply
#7

Nice -.. ignore it I didnt read that u got it worknig rofl!
Reply
#8

One more question, when other player hits him his HP goes lower.
How can I free his hp?

im stuck here:

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(GetIntVar(damagedid, "JustDied") == 1 || PlayerInfo[damagedid][pDied] == 1)
    {
   
    }
    return 1;
}
Reply
#9

Never mind got it working

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(GetIntVar(damagedid, "JustDied") == 1 || PlayerInfo[damagedid][pDied] == 1 || GetIntVar(damagedid, "LoggedInDead") == 1)
    {
        new Float:hp;
        GetPlayerHealth(damagedid, hp);
        SetPlayerHealth(damagedid, hp+amount);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)