SA-MP Forums Archive
Simple Quick question - 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)
+--- Thread: Simple Quick question (/showthread.php?tid=300821)



Simple Quick question - English-Conceptz - 02.12.2011

PROBLEM IS SOLVED, BELOW IS A UPDATE FOR THOSE TO LEARN FROM.





"or" in pawno is "||"

example :

if(gPlayerData[playerid][VIP] >= 1 || IsPlayerAdmin(playerid))

if vip level is greater than or equal to 1 or player is admin



more operators:

|| = or
&& = and
> = greater than
< = less than
>= = more than or equal
<= = less than or equal
== = equal
!= = not equal


Re: Simple Quick question - Azzeto - 02.12.2011

if (gPlayerData[playerid][VIP] >= 1 ) || (IsPlayerAdmin(playerid) == 1))


Re: Simple Quick question - English-Conceptz - 02.12.2011

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
if (gPlayerData[playerid][VIP] >= 1 ) || (IsPlayerAdmin(playerid) == 1))
i thought that was AND ?

o.0


Re: Simple Quick question - MP2 - 02.12.2011

|| = or
&& = and
> = greater than
< = less than
>= = more than or equal
<= = less than or equal
== = equal
!= = not equal


Re: Simple Quick question - Thresholdold - 02.12.2011

Код:
if(gPlayerData[playerid][VIP] >= 1 && IsPlayerAdmin(playerid) == 1)
@ Azzeto - noob xD

EDIT: SHIT! I read the post wrong... soz :P
@ Threshold - noob xD


Re: Simple Quick question - grand.Theft.Otto - 02.12.2011

https://sampwiki.blast.hk/wiki/Control_Structures#Operators


Re: Simple Quick question - imran.ali))PK(( - 02.12.2011

i think can use "if" with symbole in scrift !


Re: Simple Quick question - grand.Theft.Otto - 02.12.2011

English-Conceptz, no need to edit the first post. Others will learn from those mistakes.


Re: Simple Quick question - English-Conceptz - 02.12.2011

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
English-Conceptz, no need to edit the first post. Others will learn from those mistakes.
i have many topics open, i dont want to get abuse because people keep replying to an already solved issue.