28.01.2016, 19:00
It is happening because when player presses multiple keys, variable oldkeys is different from KEY_FIRE. You shouldn't check key pressing in the way you did.
For more detailed information see the wiki page (https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange). You will find a lot of useful advice and functions to check keys pressing.
About "How to check for multiple keys" (from the wiki page):
PHP код:
if(oldkeys & KEY_FIRE)
{
// Your code here
}
About "How to check for multiple keys" (from the wiki page):
PHP код:
if ((newkeys & KEY_FIRE) && (newkeys & KEY_CROUCH))
{
//.....
}