Animation freeze
#1

Hey there,

I will get right to the point.
I have this piece of code:

Код:
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, 1, 1);
			ApplyAnimation(playerid, "PED", "FLOOR_hit", 4.1, 0, 1, 1, 1, 1, 1);
		}
		//TogglePlayerControllable(playerid, 0);
		
		pInfo[playerid][Paralyzed] = 1;
		
		SetTimerEx("Paralysis", 240000, false, "i", playerid);
	}
	else
	{
	    pInfo[playerid][Paralyzed] = 0;
	    
	    TogglePlayerControllable(playerid, 1);

	    if(IsPlayerInAnyVehicle(playerid))
	    {
	        new vehID, seatID;

	        vehID = GetPlayerVehicleID(playerid);
	        seatID = GetPlayerVehicleSeat(playerid);
	        
	        ClearAnimations(playerid, 1);
	        
	        PutPlayerInVehicle(playerid, vehID, seatID);
	    }
	    
		ClearAnimations(playerid, 1);
		
		SendClientMessage(playerid, COLOR_INFO, "(Info):"INFO" You are slowly regaining feeling all over your body.");
	}

	return 1;
}
Been messing with the code for a while now. I have freeze in ApplyAnimation set to 1 yet the player does not freeze.
It's probably a tiny thing I did wrong, I just never got to use ApplyAnimation before.

I just want it to freeze the player, while on the floor (which is the animation)

Thanks in advance.

Important note: It does reach the ApplyAnimation code. It performs the animation, I just don't freeze.

EDIT: Uploaded the code to pastebin too, it's much cleaner there.

http://pastebin.com/gVadxvAF
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: 3 Guest(s)