detect animation - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: detect animation (
/showthread.php?tid=617259)
detect animation -
bboytimix - 18.09.2016
if player CLIMB_STAND
the animation won't work
is this code are right?
pawn Код:
new animlib[32];
new animname[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
if(strcmp(animlib, "CLIMB_STAND", true) == 0) return 0;
{
ApplyAnimation(playerid,"ped","idle_stance",4.1,0,0,0,0,1,1);
}
}
Re: detect animation -
bboytimix - 18.09.2016
bump ?
Re: detect animation -
oMa37 - 18.09.2016
Try this.
PHP код:
new animlib[32];
new animname[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
if(strcmp(animlib, "CLIMB_STAND", true) == 0)
{
ApplyAnimation(playerid,"ped","IDLE_stance",4.1,0,0,0,0,1,1);
}
}
Re: detect animation -
bboytimix - 18.09.2016
if player get CLIMB YES THE ANIMATION WONT WORK DON'TApllyAnim
if player get CLIMB NO THE ANIMATION WILL WORK ApplyAnimation
pawn Код:
if(RELEASED(KEY_SPRINT))
{
new animlib[32];
new animname[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
if(!strcmp(animlib, "CLIMB_JUMP", true))
if(!strcmp(animlib, "CLIMB_IDLE", true))
if(!strcmp(animlib, "CLIMB_PULL", true))
if(!strcmp(animlib, "CLIMB_STAND", true))
{
SendClientMessage(playerid,white,"Climb-YES");
}
ApplyAnimation(playerid,"ped","idle_stance",4.1,0,0,0,0,1,1);
SendClientMessage(playerid,white,"Climb-NO");
}
Re: detect animation -
bboytimix - 18.09.2016
bump