08.09.2012, 18:31
Hello,
I wanted to that "ternary operator",what is this?Please I need a explanation on this.
ThAnKs!
I wanted to that "ternary operator",what is this?Please I need a explanation on this.
ThAnKs!
IsConnected[playerid] = (IsPlayerConnected(playerid)) ? 1 : 0;
PlayersRank[playerid] = (IsPlayerAdmin(playerid)) ? ("Administrator") : ("Player");
new val = 4;
new otherval;
if(val == 8)
{
othervalval = 6;
}
else
{
othervalval = 12;
}
new val = 4;
new otherval;
otherval = (val == 8) ? (6) : (12);
if(a == 4)
{
b = 8;
}
else if(a == 3)
{
b = 13;
}
else
{
b = 2;
}
b = (a == 4) ? (8) : (a == 3) ? (13) : 2;