26.05.2018, 13:45
How do I charge the houses in mysql r41-3?
I moved my gm to the latest version and it does not extract data from the database.
I moved my gm to the latest version and it does not extract data from the database.
Код:
OnGamemodeInit. mysql_tquery(Database, "SELECT * FROM `houses`", "LoadedHouses", ""); LoadedHouses() { new rows; cache_get_row_count(rows); if(rows) { for(new i; i < rows; i++) { Iter_Add(TotalCasas, i); cache_get_value_int(0, "casaID", CasaInfo[i][casaID]); cache_get_value_float(0, "casaPosX", CasaInfo[i][casaPosicion][0]); cache_get_value_float(0, "casaPosY", CasaInfo[i][casaPosicion][1]); cache_get_value_float(0, "casaPosZ", CasaInfo[i][casaPosicion][2]); cache_get_value_float(0, "casaPosX2", CasaInfo[i][casaPosicion2][0]); cache_get_value_float(0, "casaPosY2", CasaInfo[i][casaPosicion2][1]); cache_get_value_float(0, "casaPosZ2", CasaInfo[i][casaPosicion2][2]); cache_get_value_int(0, "casaPrecio", CasaInfo[i][casaPrecio]); cache_get_value_int(0, "casaInterior", CasaInfo[i][casaInterior]); cache_get_value_int(0, "casaVirtualWorld", CasaInfo[i][casaVirtualWorld]); cache_get_value_int(0, "casaSeguro", CasaInfo[i][casaSeguro]); cache_get_value_int(0, "casaEstado", CasaInfo[i][casaEstado]); cache_get_value(0, "casaPropietario", CasaInfo[i][casaPropietario]); CasaInfo[i][casaPickup] = CreateDynamicPickup(1273, 1, CasaInfo[i][casaPosicion][0], CasaInfo[i][casaPosicion][1], CasaInfo[i][casaPosicion][2]); printf("%f, %f, %f", CasaInfo[i][casaPosicion][0], CasaInfo[i][casaPosicion][1], CasaInfo[i][casaPosicion][2]); printf("-> it has been loaded %d houses.", i); } } return 1; }