Loading clans from DB
#9

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);
}
Reply


Messages In This Thread
Loading clans from DB - by biker122 - 25.07.2014, 14:13
Re: Loading clans from DB - by Virtual1ty - 25.07.2014, 15:08
Re: Loading clans from DB - by biker122 - 25.07.2014, 15:23
Re: Loading clans from DB - by AMouldyLemon - 25.07.2014, 15:25
Re: Loading clans from DB - by biker122 - 25.07.2014, 15:28
Re: Loading clans from DB - by AMouldyLemon - 25.07.2014, 15:29
Re: Loading clans from DB - by Konstantinos - 25.07.2014, 15:31
Re: Loading clans from DB - by biker122 - 25.07.2014, 15:39
Re: Loading clans from DB - by Konstantinos - 25.07.2014, 15:47
Re: Loading clans from DB - by Virtual1ty - 25.07.2014, 16:09

Forum Jump:


Users browsing this thread: 7 Guest(s)