SA-MP Forums Archive
[HELP] How do i make an OR thing (see post for example) - 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: [HELP] How do i make an OR thing (see post for example) (/showthread.php?tid=127783)



[HELP] How do i make an OR thing (see post for example) - WThieves - 14.02.2010

Hi is have a problem here it is:
I want to make an OR line her is an example of what i mean:
if (PlayerInfo[playerid][pMember] == 0 OR PlayerInfo[playerid][pLeader] == 0)
I tried but it wont work


Re: [HELP] How do i make an OR thing (see post for example) - ДitisOnHuora - 14.02.2010

pawn Код:
if (PlayerInfo[playerid][pMember] || 0 OR PlayerInfo[playerid][pLeader] == 0)
Right Alt + <

|||||||||||


Re: [HELP] How do i make an OR thing (see post for example) - WThieves - 14.02.2010

Quote:
Originally Posted by ДitisOnHuora
pawn Код:
if (PlayerInfo[playerid][pMember] || 0 OR PlayerInfo[playerid][pLeader] == 0)
Right Alt + <

|||||||||||
uhhmmm that didn't work


Re: [HELP] How do i make an OR thing (see post for example) - Perker12345 - 14.02.2010

pawn Код:
if (PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
|| = OR
&& = And


Re: [HELP] How do i make an OR thing (see post for example) - ДitisOnHuora - 14.02.2010

Quote:
Originally Posted by Perker12345
pawn Код:
if (PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
|| = OR
&& = And
Like Perker sayd.


Re: [HELP] How do i make an OR thing (see post for example) - WThieves - 14.02.2010

Quote:
Originally Posted by Perker12345
pawn Код:
if (PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
|| = OR
&& = And
This doesn't work if i do || i still have to be both so it seems my server sees || ad && or something how can this happen?


Re: [HELP] How do i make an OR thing (see post for example) - Joe Staff - 14.02.2010

Show us your code, or read wiki.sa-mp.com beginner's tutorial.

There is no other symbol or method for 'OR'. You're just doing something wrong.


Re: [HELP] How do i make an OR thing (see post for example) - gotenks918 - 14.02.2010

Well what are you using it for? If someone is a leader arn't they going to be a member anyway?


Re: [HELP] How do i make an OR thing (see post for example) - owner jacob - 14.02.2010

i would say that || is or but OR isnt ever used..atleast i never seen it used before


Re: [HELP] How do i make an OR thing (see post for example) - WThieves - 14.02.2010

Quote:
Originally Posted by Joe Staff
Show us your code, or read wiki.sa-mp.com beginner's tutorial.

There is no other symbol or method for 'OR'. You're just doing something wrong.
I knew it had to be || but it suddenly didn't work anymore so i think there's something wrong with my pInfo vecause i inserted a new one pPriv
and i think that makes it that way