How do you say "or" with pawn?
#1

I know this is probably the most humiliating question you have ever seen, but I'm seriously drawing a blank. It's been about 9 months since I last scripted and I'm just getting back into it.

Basically, I want to check if they press KEY_SPRINT or KEY_FIRE.

Код:
	    if(newkeys == KEY_SPRINT)
	    {
	        SendClientMessage(playerid, COLOR_WHITE, "Hi.");
	     }
Reply
#2

if(newkeys & KEY_xxx || newkeys & KEY_xxx2) { dunno why var & name but that's how i see it in most cases, usinng onplayerkeys is something I do almost NEVER xD
Reply
#3

pawn Код:
if(newkeys == KEY_SPRINT || newkeys == KEY_FIRE)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Hi.");
         }
&& = AND
|| = OR
Reply
#4

Fuck me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)