stock AddLabelToFile(text[], Float:x, Float:y, Float:z, Float:distance, wv)
{
new
EscString[128];
mysql_real_escape_string(text, EscString);
format(query, sizeof(query), "INSERT INTO `3dtextlabel` (text, x, y, z, distance, wv) VALUES(%s, %f, %f, '%f', '%f' '%i')",EscString, x, z, y, distance, wv);
mysql_query(sqldb, query);
mysql_free_result();
return 1;
}
[16:43:40] [DEBUG] mysql_query - connection: 1, query: "INSERT INTO `3dtextlabel` (text, x, y, z, distance, wv) VALUES(a", use_cache: true
[16:43:40] [DEBUG] CMySQLQuery::Execute - starting query execution
[16:43:40] [ERROR] CMySQLQuery::Execute - (error #1054) Unknown column 'asd' in 'field list'
format(query, sizeof(query), "INSERT INTO `3dtextlabel` (text, x, y, z, distance, wv) VALUES('%s', %f, %f, %f, %f, %i)",EscString, x, z, y, distance, wv);
stock Load3DTextLabels()
{
new
Str[100],
text[128],
Float:x,
Float:y,
Float:z,
Float:tavolsag,
wv,
total;
format(query, sizeof(query), "SELECT * FROM `3dtextlabel`");
mysql_query(sqldb, query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
while(mysql_fetch_row(Str))
{
sscanf(Str, "p<|>s[128]ffffi", text, x, y, z, tavolsag, wv);
Create3DTextLabel(text, 0xFF0606FF, x, y, z, tavolsag, wv, 1);
total++;
printf("debug: %s %f %f %f %f i",text, x, y, z, tavolsag, wv);
}
}
mysql_free_result();
printf("%i textlabel betцltve!",total);
return 1;
}
[16:57:25] debug: 1 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 3 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 4 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 5 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 6 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 7 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 8 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 9 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] debug: 10 0.000000 0.000000 0.000000 0.000000 0
[16:57:25] 9 textlabel betцltve!
3 RR04-01 -41.549 19.516 1169.14 10 0
pawn Код:
|