Can someone explain to me these expressions?
#1

>= - ?

!= - ?

== - ?

+= - Set More i think

-= - ?

|| - ?

&& - ?

Can someone explain to me these expressions?
Reply
#2

Quote:
Originally Posted by CJoao
View Post
>= - ?

!= - ?

== - ?

+= - 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");
Reply
#3

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

Wow I totally forgot that.
Reply
#5

Thank you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)