OnPlayerKeyStateChange Problem
#1

Ok guys, if i do:
pawn Код:
if(newkeys & 132) // KEY_FIRE | KEY_AIM => KEY_AIMFIRE
It works, but actually works if I press: DUCK(crouch) + KEY_AIM

Why ?
Reply
#2

If you know what Bitwise operation are than you should know why this happens

If you dont than I need to tell you that this always works if someone press KEY_FIRE or KEY_AIM

To solve this just do

pawn Код:
if((newkeys & 132) == 132)
Reply
#3

thx ()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)