06.02.2018, 22:38
I've created a house system and the pickup doesn't create
Code:
Code:
Код:
forward LoadHouses(); public LoadHouses() { new rows; cache_get_row_count(rows); if(rows) { new id, loaded; for(new i = 0; i < rows; i++) { cache_get_value_name_int(loaded, "ID", id); cache_get_value_name_float(loaded, "EnterX", hInfo[id][hEnterX]); cache_get_value_name_float(loaded, "EnterY", hInfo[id][hEnterY]); cache_get_value_name_float(loaded, "EnterZ", hInfo[id][hEnterZ]); cache_get_value_name_float(loaded, "ExitX", hInfo[id][hExitX]); cache_get_value_name_float(loaded, "ExitX", hInfo[id][hExitY]); cache_get_value_name_float(loaded, "ExitY", hInfo[id][hExitZ]); cache_get_value_name_float(loaded, "ExitZ", hInfo[id][hExitX]); cache_get_value_name_int(loaded, "InsideInt", hInfo[id][hInsideInt]); cache_get_value_name_int(loaded, "InsideVir", hInfo[id][hInsideVir]); cache_get_value_name_int(loaded, "OutsideInt", hInfo[id][hOutsideInt]); cache_get_value_name_int(loaded, "Level", hInfo[id][hLevel]); cache_get_value_name(loaded, "Owner", hInfo[id][hOwner], 48); cache_get_value_name_int(loaded, "Price", hInfo[id][hPrice]); new string[255]; format(string, sizeof(string), "House %d, x: %d, y:%d, z:%d", id, hInfo[id][hEnterX], hInfo[id][hEnterY], hInfo[id][hEnterZ]); print(string); loaded++; hInfo[id][hPickup] = CreatePickup(1273, 0, hInfo[id][hEnterX], hInfo[id][hEnterY], hInfo[id][hEnterZ], -1); } new string[255]; format(string, sizeof(string), "Loaded %d houses from Database.", rows); print(string); } else { print("No house loaded on Database."); return 1; } return 1; }