25.07.2014, 15:47
pawn Код:
LoadClans()
{
mysql_format(MySQL, gQuery, 256, "SELECT * FROM "Clans_Table"");
mysql_tquery(MySQL, gQuery, "CB_LoadClans", "");
}
forward CB_LoadClans();
public CB_LoadClans()
{
for (new i = 0, rows = cache_get_row_count(); i != rows; ++i)
{
if (i >= sizeof (cInfo)) break;
cInfo[i][cID] = cache_get_field_content_int(i, "cID");
cache_get_field_content(i, "cName", cInfo[i][cName], MySQL, 50);
cache_get_field_content(i, "cOwner", cInfo[i][cOwner], MySQL, MAX_PLAYER_NAME);
cache_get_field_content(i, "cOwner2", cInfo[i][cOwner2], MySQL, MAX_PLAYER_NAME);
cInfo[i][cMembers] = cache_get_field_content_int(i, "cMembers");
cInfo[i][cScore] = cache_get_field_content_int(i, "cScore");
ClansCreated++;
}
printf("[Bronze Stunting] Loaded %i clans.", ClansCreated);
}