29.04.2012, 12:38
There's a sweet feature in the format function regarding strings, if you put a value between '%' and 's', it basically fills in the empty slots with spaces (' ').
Examples:
Format your dialog strings this way:
I haven't tested this so I'm not sure if it works like you want, but just wanted to let you know about this feature.
Examples:
pawn Код:
print("%10s", "test");
// This will print "test "
print("%20s", "test");
// This will print "test "
print("%30s", "test");
// This will print "test "
print("%40s", "test");
// This will print "test "
print("%50s", "test");
// This will print "test "
pawn Код:
// 24 is the max player name lenght
format(string, sizeof(string), "%24s\t%d\t%s", name, level, activity);