26.06.2012, 17:09
Hi everyone,
I'm pretty new with loading massive MYSQL things, and am stuck on my Factions loading part...
here is the function:
I thought it was right, but apperently not..
I'm pretty new with loading massive MYSQL things, and am stuck on my Factions loading part...
here is the function:
pawn Код:
forward LoadFactions();
public LoadFactions()
{
new Query[300];
for(new i = 0; i < MAX_FACTIONS; i++)
{
format(Query, sizeof(Query), "SELECT * FROM `Factions` WHERE `FactionID` = '%s' ", FactionCount);
mysql_query(Query);
mysql_store_result();
mysql_fetch_row_format(Query);
sscanf(Query, "e<p<|>is[128]s[128]dfff>", FInfo[i]);
mysql_free_result();
FactionCount++;
new string[128];
format(string,sizeof(string),"Faction Name: %s \nOwned by: %s\nFaction Value: %d",FInfo[i][Name],FInfo[i][Owner],FInfo[i][Value]);
CreateDynamicPickup(1239,1,FInfo[i][LocationX],FInfo[i][LocationY],FInfo[i][LocationZ],-1,-1,-1,100.0);
CreateDynamic3DTextLabel(string,COLOR_RED,FInfo[i][LocationX],FInfo[i][LocationY],FInfo[i][LocationZ],100.0);
}
}