Animation freeze
#6

pawn Код:
public Paralysis(playerid)
{
    if(pInfo[playerid][Paralyzed] == 0)
    {
        SendClientMessage(playerid, COLOR_INFO, "(Info):"INFO" You have drank a bottle of poisoned water, you are paralyzed.");
        SendClientMessage(playerid, COLOR_INFO, "(Info):"INFO" The paralysis will wear off in 4 minutes.");

        if(!IsPlayerInAnyVehicle(playerid)) ApplyAnimation(playerid, "PED", "FLOOR_hit", 4.1, 0, 1, 1, 1, 0, 1);

        pInfo[playerid][Paralyzed] = 1;
        SetTimerEx("Paralysis", 240000, false, "i", playerid);
    }
    else if(pInfo[playerid][Paralyzed] == 1)
    {
        pInfo[playerid][Paralyzed] = 0;
        if(IsPlayerInAnyVehicle(playerid))
        {
            ClearAnimations(playerid, 1);
            PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), GetPlayerVehicleSeat(playerid));
        }
        else ClearAnimations(playerid, 1);
        SendClientMessage(playerid, COLOR_INFO, "(Info):"INFO" You are slowly regaining feeling all over your body.");
    }
    return 1;
}
You shouldn't need to load the animation twice. For preloading animation libraries, search for the function 'PreloadAnimLib' and apply that under OnPlayerSpawn instead of doing it every time you want to use an animation. As for the issues you're having with the freezing not being applied, it's probably due to the animation being played twice or the timer on the animation being set to 1 millisecond. Try the code I just gave and see if it fixes anything and let me know the results.
Reply


Messages In This Thread
Animation freeze - by Denying - 19.08.2015, 09:23
Re: Animation freeze - by Inn0cent - 19.08.2015, 09:45
Re: Animation freeze - by Denying - 19.08.2015, 09:55
Re: Animation freeze - by Inn0cent - 19.08.2015, 10:09
Re: Animation freeze - by Denying - 19.08.2015, 10:30
Re: Animation freeze - by Threshold - 19.08.2015, 10:49
Re: Animation freeze - by Denying - 19.08.2015, 11:31

Forum Jump:


Users browsing this thread: 1 Guest(s)