01.06.2018, 01:11
Quote:
PHP код:
|
PHP код:
LoadFactions()
{
new rows, Cache:result, query[60];
for(new i = 0; i < MAX_FACTIONS; i++)
{
mysql_format(Connect, query, sizeof(query), "SELECT * FROM `factions` WHERE `fID` = %d", i);
result = mysql_query(Connect, query);
if(cache_get_row_count(rows))
{
cache_get_value_int(0, "fID", Factions[i][fID]);
cache_get_value_int(0, "fLeaderID", Factions[i][fLeaderID]);
cache_get_value_name(0, "fLeaderName", Factions[i][fLeaderName]);
cache_get_value_name(0, "fNome", Factions[i][fNome]);
cache_get_value_name(0, "fTag",Factions[i][fTag]);
cache_get_value_name(0, "Cargo1Faction", Factions[i][Cargo1Faction]);
cache_get_value_name(0, "Cargo2Faction", Factions[i][Cargo2Faction]);
cache_get_value_name(0, "Cargo3Faction",Factions[i][Cargo3Faction]);
cache_get_value_name(0, "Cargo4Faction",Factions[i][Cargo4Faction]);
cache_get_value_name(0, "Cargo5Faction",Factions[i][Cargo5Faction]);
cache_get_value_int(0, "fKScore", Factions[i][fKScore]);
cache_get_value_int(0, "fDScore", Factions[i][fDScore]);
cache_get_value_int(0, "fCarteira", Factions[i][fCarteira]);
}
}
printf("[Faction] - %i Facзхes foram carregadas!", rows);
Total_Factions_Created = rows;
cache_delete(result);
return 1;
}