09.08.2014, 16:36
Need to make it to use
EDIT:
Made it like this instead:
Still dont load though
Код:
forward OnLoadTextLabels();
public OnLoadTextLabels()
{
new totalLabels = cache_get_row_count();
for(new i,j = totalLabels ; i != j; i++)
{
cache_get_field_content(0,"t_text",tInfo[i][t_string],conn);
cache_get_field_content(0,"t_color_",tInfo[i][t_color],conn);
tInfo[i][t_postion][0] = cache_get_field_content_float(0,"t_x",conn);
tInfo[i][t_postion][1] = cache_get_field_content_float(0,"t_y",conn);
tInfo[i][t_postion][2] = cache_get_field_content_float(0,"t_z",conn);
tInfo[i][t_id] = cache_get_field_content_int(0,"t_id_",conn);
tInfo[i][t_label] = Create3DTextLabel(tInfo[i][t_string],0xED1414FF,tInfo[i][t_postion][0],tInfo[i][t_postion][1],tInfo[i][t_postion][2],40.0,0,0);
}
return 1;
}
Made it like this instead:
Код:
stock LoadTextLabels()
{
mysql_query(conn,"SELECT * FROM textlabel");
new totalLabels = cache_get_row_count();
for(new i,j = totalLabels ; i != j; i++)
{
cache_get_field_content(0,"t_text",tInfo[i][t_string],conn);
cache_get_field_content(0,"t_color_",tInfo[i][t_color],conn);
tInfo[i][t_postion][0] = cache_get_field_content_float(0,"t_x",conn);
tInfo[i][t_postion][1] = cache_get_field_content_float(0,"t_y",conn);
tInfo[i][t_postion][2] = cache_get_field_content_float(0,"t_z",conn);
tInfo[i][t_id] = cache_get_field_content_int(0,"t_id_",conn);
tInfo[i][t_label] = Create3DTextLabel(tInfo[i][t_string],0xED1414FF,tInfo[i][t_postion][0],tInfo[i][t_postion][1],tInfo[i][t_postion][2],40.0,0,0);
print("Loaded Labels");
}
return 1;
}


