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

SetPlayerPedAnims

GtakillerIV edited this page Nov 15, 2014 · 5 revisions

SetPlayerPedAnims

Sets a player's animation set to the default ones(CJ's animation set)


Parameters

playerid

The player's id.

bool:Toggle

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

Can be either true or false.

Returns

    0 if the player is not connected

Usage

new bool:defaultAnim[MAX_PLAYERS];

CMD:defaultanims(playerid, params[])
{
	//If the player has SA-MP+ installed
	if(IsUsingSAMPP(playerid))
	{
		//If the player is already using the default animation set
		if(defaultAnim[playerid])
		{
			SendClientMessage(playerid, -1, "You are no longer using CJ's animation set");

			SetPlayerPedAnims(playerid, false);

			defaultAnim[playerid] = false;
		}
		//If not
		else
		{
			SendClientMessage(playerid, -1, "You are now using CJ'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

SetPlayerWaveHeight

SetBlurIntensity

Clone this wiki locally