• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ternary Operator Basics
#3
(2021-04-28, 07:58 AM)Shadow Wrote: Good tutorial, you just forgot to mention that ternary operator supports multiple conditions.

For example:

PHP Code:
SendClientMessage(playerid, -1playerData[playerid][pAdmin] == "Admin lvl 1" playerData[playerid][pAdmin] == "Admin lvl 2" playerData[playerid][pAdmin] == "Admin lvl 3" "Admin lvl 4"); 



And btw, you don't need brackets, just own preference.



Thank you for contributing to the tutorial. :D
  Reply


Messages In This Thread
Ternary Operator Basics - by RhaegarX - 2021-01-20, 07:29 PM
RE: Ternary Operator Basics - by Shadow - 2021-04-28, 07:58 AM
RE: Ternary Operator Basics - by RhaegarX - 2021-04-30, 12:22 AM
RE: Ternary Operator Basics - by kemper - 2021-04-30, 06:11 PM
RE: Ternary Operator Basics - by Shadow - 2021-05-03, 02:40 PM

Forum Jump: