24.01.2013, 07:46
I made 3dtext label system.. but when it loads.. it creates only 1 text draw from the first row, the rest no...
Code:
public LoadDynamicLabels() { new rows, fields, Float:posx, Float:posy, Float:posz, LabelInfo[256], tt[256]; new total = 0; cache_get_data(rows, fields); if(rows) { while(total < rows) { new temp[12]; cache_get_row(0, 1, temp), posx = floatstr(temp); cache_get_row(0, 2, temp), posy = floatstr(temp); cache_get_row(0, 3, temp), posz = floatstr(temp); cache_get_row(0, 4, LabelInfo); CreateDynamic3DTextLabel(LabelInfo, COLOR_WHITE, posx, posy, posz, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0); total++; } } format(tt,sizeof(tt), "Loaded %d labels from MySQL.", total); printf(tt); return 1; }