Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

SetPlayerPedAnims

GtakillerIV edited this page Dec 17, 2014 · 5 revisions

SetPlayerPedAnims

Sets a player's animation set to the skin's default ones


Parameters

playerid

The player's id.

bool:Toggle

Whether you want the player to use the skin's default animation set or not.

Can be either true or false.

Returns

    0 if the player is not connected

Usage

CMD:defaultanims(playerid, params[])
{
	//If the player has SA-MP+ installed
	if(IsUsingSAMPP(playerid))
	{
		static bool:defaultAnim[MAX_PLAYERS];

		//If the player is already using the default animation set
		if(defaultAnim[playerid])
		{
			SendClientMessage(playerid, -1, "You are now using CJ's animation set");

			SetPlayerPedAnims(playerid, false);

			defaultAnim[playerid] = false;
		}
		//If not
		else
		{
			SendClientMessage(playerid, -1, "You are now using your skin's animation set");

			SetPlayerPedAnims(playerid, true);

			defaultAnim[playerid] = true;
		}
	}
	//If not
	else
	{
		SendClientMessage(playerid, -1, "You need the SA-MP+ plugin");
	}
	return 1;
}

See Also

SetPlayerGameSpeed

SetWaveHeightForPlayer

SetBlurIntensity

Clone this wiki locally