This repository was archived by the owner on Feb 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
SetPlayerPedAnims
GtakillerIV edited this page Dec 17, 2014
·
5 revisions
Sets a player's animation set to the skin's default ones
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
.
0 if the player is not connected
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