Can someone explain to me these expressions? - 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: Can someone explain to me these expressions? (
/showthread.php?tid=275006)
Can someone explain to me these expressions? -
CJoao - 08.08.2011
>= - ?
!= - ?
== - ?
+= - Set More i think
-= - ?
|| - ?
&& - ?
Can someone explain to me these expressions?
Re: Can someone explain to me these expressions? -
Tee - 08.08.2011
Quote:
Originally Posted by CJoao
>= - ?
!= - ?
== - ?
+= - Set More i think
-= - ?
|| - ?
&& - ?
Can someone explain to me these expressions?
|
!= - Not equal to
== - Equal
+= - Plus equal like (cash = cash + 10) you're adding 10 to cash.
+= - Minus equal like (cash = cash - 10) you're taking 10 to from cash.
|| - Means OR:
pawn Code:
if(GetPlayerWeapon(playerid) == 37 || GetPlayerWeapon(playerid) == 38)return Ban(playeird);
&& - Means AND:
pawn Code:
if(GetPlayerWeapon(playerid) == 37 && GetPlayerWeapon(playerid) == 38)return SendClientMessage(playerid,-1,"You have a Flamethrower and a minigun");
Re: Can someone explain to me these expressions? -
grand.Theft.Otto - 08.08.2011
https://sampwiki.blast.hk/wiki/Control_Structures#Operators
Re: Can someone explain to me these expressions? -
Tee - 08.08.2011
Wow I totally forgot that.
Re: Can someone explain to me these expressions? -
CJoao - 08.08.2011
Thank you!