&& and ||
#1

What's the Difference between || and &&
Reply
#2

&& means and & || means or.

Read more here: https://sampwiki.blast.hk/wiki/Control_Structures#Operators
Reply
#3

pawn Код:
if (a == true && b == true) {
    // This only gets excuted if BOTH a AND (&& = and) b are true
}
if (a == true || b == true) {
    // This gets executed when either:
    // a == true (b can be true or false) OR (|| = or)
    // b == true (a can be true or false)
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)