11.03.2012, 12:16
mysql_fetch_field_row is incredibly slow, compared to just fetching the whole row at once.
Just make an enumerator:
Then:
Just make an enumerator:
pawn Код:
enum e_OjbectData
{
model,
Float:Xpos,
Float:Ypos,
Float:Zpos,
Float:RX,
Float:RY,
Float:RZ,
MapName[128],
Float:DrawDist,
ObjectID
}
pawn Код:
new
tempMapData[e_ObjectData];
while(mysql_fetch_row_format(query,"|"))
{
sscanf(query, "p<|>e<dffffffs[128]fd>", tempMapData);
CreateObject(tempMapData[model], tempMapData[Xpos], tempMapData[Ypos], tempMapData[Zpos], tempMapData[RX], tempMapData[RY], tempMapData[RZ], tempMapData[DrawDist]);
}