28.05.2013, 20:44
Hey guys for some reason the dynamic lables are not showing up when the server loads, Its says and defined that there aren't any in the database when there's three, I don't know if this is a sscanf error or its just not loading correctly
Loading
pawn Код:
enum DynamicLables {
DynamicLableID,
Float: DL_X,
Float: DL_Y,
Float: DL_Z,
DL_String[500]
};
new DL_Data[MAX_DYNAMIC_LABLES][DynamicLables];
new Text3D:DL_Set[MAX_DYNAMIC_LABLES];
new LableCount;
pawn Код:
public CreateDynamicLables()
{
new LableID,FetchRow[300];
format(Query, sizeof(Query), "SELECT * FROM `dynamiclabels`");
mysql_query(Query);
mysql_store_result();
LableID = mysql_num_rows();
//DL_Data[LableID][]
if(LableID > 0)
{
while(mysql_fetch_row(FetchRow))
{
//DynamicLableID
sscanf(FetchRow, "p<|>dfffs[300]>", DL_Data[LableID]);
DL_Set[LableID] = CreateDynamic3DTextLabel(DL_Data[LableID][DL_String], 0xFFFFFF, DL_Data[LableID][DL_X], DL_Data[LableID][DL_Y], DL_Data[LableID][DL_Z], 100.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100);
LableID++;
LableCount ++;
}
mysql_free_result();
} else {
print("No Dynamic Lables were created, Make some ingame");
}
return 1;
}