SA-MP Forums Archive
How? - 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: How? (/showthread.php?tid=612600)



How? - FrAnKiN1 - 19.07.2016

How to make key in my script to stop running anim?
like enter button/Lmb click.


Re: How? - Inn0cent - 19.07.2016

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange


Re: How? - FrAnKiN1 - 19.07.2016

still didnt get it :/


Re: How? - Inn0cent - 19.07.2016

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if (
PRESSED(KEY_FIRE))
    {
        
ClearAnimations(playerid);
    }
    return 
1;




Re: How? - FrAnKiN1 - 19.07.2016

Код:
error 017: undefined symbol "PRESSED"



Re: How? - Inn0cent - 19.07.2016

PHP код:
#define PRESSED(%0) \
    
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) 
Put this at top of your script.


Re: How? - FrAnKiN1 - 19.07.2016

Worked thanks +rep