23.04.2014, 00:30
pawn Код:
mysql_pquery(g_Handle, "SELECT * FROM `houses`", "OnHouseLoad");
pawn Код:
forward OnHouseLoad();
public OnHouseLoad()
{
if(cache_num_rows())
{
for(new i = 0; i<cache_num_rows(); i++)
{
cache_get_field_content_int(i,"SQLID",g_Handle);
cache_get_field_content_float(i,"Posx",g_Handle);
cache_get_field_content_float(i,"Posy",g_Handle);
cache_get_field_content_float(i,"Posz",g_Handle); //the row becomes "i". Since you're looping the number of rows found.
//load more...
print("test");
}
}
}
Not sure if I miss something but it doesnt print so theres is something wrong