14.01.2014, 04:52
Here's a "SetPlayerAnimationIndex" function.
I found it pretty pointless to store 256 cells of memory for the animation name and library, so I figured, why not save it by the index?
I found it pretty pointless to store 256 cells of memory for the animation name and library, so I figured, why not save it by the index?
pawn Код:
stock SetPlayerAnimationIndex(playerid, index, Float:fDelta, loop, lockx, locky, freeze, time)
{
static
name[32],
library[32]
;
if (1 <= index <= 1812)
{
GetAnimationName(index, name, sizeof name, library, sizeof library);
ApplyAnimation(playerid, library, name, fDelta, loop, lockx, locky, freeze, time);
}
return 1;
}