SA-MP Forums Archive
how do i wright or? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how do i wright or? (/showthread.php?tid=271528)



how do i wright or? - slymatt - 24.07.2011

for example

Код:
if(playerid == 1 or 2 or 3 or 4 or 5)
but "or" doesnt work.


Re: how do i wright or? - iGetty - 24.07.2011

Do you mean

pawn Код:
if(playerid == 1 || 2 || 3 || 4 || 5)
?


Re: how do i wright or? - MoroDan - 24.07.2011

Quote:
Originally Posted by getty154
Посмотреть сообщение
Do you mean

pawn Код:
if(playerid == 1 || 2 || 3 || 4 || 5)
?
You wrong too.

Try:
pawn Код:
if(playerid == 1 || playerid == 2 || playerid == 3 || playerid == 4 || playerid == 5)
or
pawn Код:
if(playerid > 0 && playerid < 6)
or
pawn Код:
if(playerid >= 1 && playerid <= 5)
or
pawn Код:
if(!(playerid < 1 || playerid > 5))



Re: how do i wright or? - slymatt - 24.07.2011

ahhhh thanks a lot =)