01.06.2016, 21:38
Huh.
Код:
forward LoadBays();
public LoadBays()
{
new query[128], data[128];
mysql_query(conhandlegoeshere, SELECT * FROM `bays`);
new rows = cache_num_rows(), id = 0;
for(new id = 0, rows=cache_num_rows(); id < rows; id++)
{
format(query, sizeof query, "SELECT * FROM `bays` WHERE id='%d'", id);
mysql_query(query);
new row = cache_num_rows();
if(row != 0)
{
BayCache[bUID] = cache_get_field_content_int(0,"uid", urchandlehere);
cache_get_field_content(0, "name", BayCache[bName], urchandlehere, sizeofwillnotworkhereaddmanually)
BayCache[bPosX] = cache_get_field_content_float(0, "posX", urchandlehere);
BayCache[bPosY] = cache_get_field_content_float(0, "posY", urchandlehere);
BayCache[bPosZ] = cache_get_field_content_float(0, "posZ", urchandlehere);
}
}
printf("%s", BayCache[bName]);
return 1;
}

