08.08.2012, 16:39
This is the most optimased I can think of:
pawn Код:
stock GetTeles(playerid) {
new string[1000];
for(new i = 0; i < sizeof(TeleportsPos); i++) {
format(string, sizeof string, "%s%s%s\n", string,(i%2)?("{FF0000}"):("{00FF00}"), TeleportsPos[i][Name]);
}
ShowPlayerDialog(playerid, DIALOG_TELES, DIALOG_STYLE_LIST, "Teleports", string, "Teleport", "Cancel");
return 1;
}