What am I doing wrong in this? - 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: What am I doing wrong in this? (
/showthread.php?tid=633904)
What am I doing wrong in this? -
ProBro - 09.05.2017
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(newkeys & KEY_WALK))
{
ApplyAnimation(playerid, "PED", "ROB_Loop_Threat", 4.1, 1, 1, 1, 1, 1, 1);
SetPlayerAttachedObject(playerid,3,18729,2,-0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1,0);
}
Attached object is working,The animation is not.
Re: What am I doing wrong in this? -
GoldenLion - 09.05.2017
Код:
if (PRESSED(KEY_WALK))
I think
Код:
if (newkeys & KEY_WALK)
would be enough as well.
Re: What am I doing wrong in this? -
edyun - 09.05.2017
The animation is canceled by the other walk animation I think.
Re: What am I doing wrong in this? -
lollypap54 - 09.05.2017
your applyanimation timer argument is 1ms, change it to 0 for never ending loop
Re: What am I doing wrong in this? -
ProBro - 09.05.2017
still ain't working :c
Re: What am I doing wrong in this? -
lollypap54 - 09.05.2017
try to run ClearAnimation before applyanimation? or after keystate function with timer, maybe walk animation is why animation is not working.