stock LoadTextLabels() { for(new i,j = MAX_TEXT; i != j; i++) { mysql_query(conn,"SELECT * FROM textlabel"); 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); } SetTimer("_loadTextAllTextLabel",2000,false); return 1; } forward _loadTextAllTextLabel(); public _loadTextAllTextLabel() { for(new i,j = MAX_TEXT; i != j; i++) { 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; }
mysql_query(conn,"CREATE TABLE IF NOT EXISTS textlabel(t_id_ INT(20),t_text VARCHAR(22 ![]() |
CMD:maketext(playerid,params[]) { if(sscanf(params,"s[128]",params[0])) return SendClientMessage(playerid,-1,"[Usage]: /maketext [Text-string]"); new gQuery[356], Float: gPos[MAX_PLAYERS][3]; tInfo[playerid][t_id] ++; GetPlayerPos(playerid,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2]); format(gQuery, sizeof(gQuery), "INSERT INTO textlabel(`t_id_`,`t_text`,`t_color_`,`t_x`,`t_y`,`t_z`) VALUES ('%d', '%s', '%s', '%f', '%f', '%f')", tInfo[playerid][t_id],params[0],"red",gPos[playerid][0],gPos[playerid][1],gPos[playerid][2]); mysql_function_query(conn, gQuery, false, "", ""); for(new i,j = MAX_TEXT; i != j; i++) tInfo[i][t_id] ++; tInfo[playerid][t_label] = Create3DTextLabel(params[0],0xED1414FF,gPos[playerid][0],gPos[playerid][1],gPos[playerid][2],40.0,0,0); SendClientMessage(playerid,-1,"[Success]: you successuflly created a textlabel!"); return 1; }
stock LoadTextLabels()
{
mysql_query(conn,"SELECT * FROM textlabel", "OnLoadTextLabels", "");
return 1;
}
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);[B][/B]
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;
}
mysql_query(conn,"SELECT * FROM textlabel", "OnLoadTextLabels", "");
number of arguments does not match definition |
mysql_query(conn,"SELECT * FROM textlabel");
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; }
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; }