06.10.2015, 03:34
Basically, you are putting a "\n" instead of a "\t" for every 4th JoinedPlayer line. So this part:
Checks if "i + 1" is divisible by 4. We exclude '23', because we don't want to add a "\n" to the last JoinedPlayer line.
This line:
is the same as doing this:
pawn Код:
!((i + 1) % 4)
This line:
pawn Код:
format(JoinedPlayerStr, sizeof(JoinedPlayerStr), (!((i + 1) % 4) && i != 23) ? ("{%s}%s\n") : ("{%s}%s\t"), colorstring, GetName(JoinedPlayer[i]));
pawn Код:
if(!((i + 1) % 4) && i != 23) format(JoinedPlayerStr, sizeof(JoinedPlayerStr), "{%s}%s\n", colorstring, GetName(JoinedPlayer[i]));
else format(JoinedPlayerStr, sizeof(JoinedPlayerStr), "{%s}%s\t", colorstring, GetName(JoinedPlayer[i]));