05.03.2013, 19:24
pawn Код:
public OnHousesLoaded()
{
new rows, fields;
cache_get_data(rows, fields, Gconnection);
if(rows) {
for(new i = 0; i < rows; i++) {
new owner[24], Intname[100], X[50], Y[50], Z[50], SQL[50], create;
cache_get_row(i, 1, owner);
cache_get_row(i, 3, Intname);
cache_get_row(i, 5, X);
cache_get_row(i, 6, Y);
cache_get_row(i, 7, Z);
cache_get_row(i, 0, SQL);
create = HouseCreate(owner, Intname, floatstr(X), floatstr(Y), floatstr(Z));
HouseInfo[create][SqlID] = strval(SQL);
print(" it's 'loaded'");
printf("%s %s %f %f %f %d", owner, Intname, floatstr(X), floatstr(Y), floatstr(Z), strval(SQL));
}
}
return 1;
}