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 Nov 15, 2014
·
5 revisions
Sets a player's animation set to the default ones(CJ's animation set)
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
.
0 if the player is not connected
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