- Регистрация
- 9 Апр 2020
- Сообщения
- 33
- Лучшие ответы
- 0
- Репутация
- 1
Не загружает автомобиль
enum
OnGameModeInit
load_vehicle
mysql_log
enum
PHP:
enum vInfo
{
c_id,
c_owner,
Float:c_x,
Float:c_y,
Float:c_z,
Float:c_a
};
new VehicleInfo[MAX_CARS][vInfo];
PHP:
mysql_tquery(con_bd,"SELECT * FROM `vehicle`", "load_vehicle", "");//загрузка домов
PHP:
stock load_vehicle()
{
new rows,fields;
cache_get_data(rows,fields,connects);
if(!rows) print ("-> Автомобили не загружены");
for(new i; i < rows; i ++)
{
VehicleInfo[i][c_id] = cache_get_field_content_int(i, "c_id", con_bd);
VehicleInfo[i][c_owner] = cache_get_field_content_int(i, "c_owner", con_bd);
VehicleInfo[i][c_x] = cache_get_field_content_int(i, "c_x", con_bd);
VehicleInfo[i][c_y] = cache_get_field_content_int(i, "c_y", con_bd);
VehicleInfo[i][c_z] = cache_get_field_content_int(i, "c_z", con_bd);
VehicleInfo[i][c_a] = cache_get_field_content_int(i, "c_a", con_bd);
}
CreateVehicle(411, VehicleInfo[i][c_x], VehicleInfo[i][c_y], VehicleInfo[i][c_z], VehicleInfo[i][c_a], 0, 0, 1, 0);
return 1;
}
PHP:
[23:08:40] [plugins/mysql] mysql_tquery: callback error: callback "load_vehicle" does not exist