2021-04-30, 12:22 AM
(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, -1, playerData[playerid][pAdmin] == 1 ? "Admin lvl 1" : playerData[playerid][pAdmin] == 2 ? "Admin lvl 2" : playerData[playerid][pAdmin] == 3 ? "Admin lvl 3" : "Admin lvl 4");
And btw, you don't need brackets, just own preference.
Thank you for contributing to the tutorial. :D