10.05.2016, 15:45
There are few things that can be improved though:
- Getting fields when not used (not necessary).
- Using isnull instead of strfind.
- Using strcat instead of format (jlalt used it).
I find this way better:
- Getting fields when not used (not necessary).
- Using isnull instead of strfind.
- Using strcat instead of format (jlalt used it).
I find this way better:
pawn Код:
new tmp_str[MAX_PLAYER_NAME + 1];
rows = cache_num_rows();
if (!rows) str = "Create Character";
else
{
str[0] = EOS;
for (new i = 0; i < rows; i++)
{
cache_get_row(i, 0, tmp_str);
strcat(str, tmp_str, sizeof str);
strcat(str, "\n", sizeof str);
}
}
ShowPlayerDialog(...);