Vitalik123123
Ученик
Пытаюсь сделать загрузку автомобиля из бд, поставил printf, срабатывает, но автомобиль не появляется, где я накосячил?
PHP:
public load_vehicle()
{
new rows;
new string[128],car;
if(rows)
{
for(new idx = rows-1; idx != -1; --idx)
{
cache_get_value_name_int(idx, "cID", veh_info[idx][v_model]);
cache_get_value_name_int(idx, "owhed", p_info[idx][name]);
cache_get_value_name_int(idx, "color1", veh_info[idx][v_color][0]);
cache_get_value_name_int(idx, "color2", veh_info[idx][v_color][1]);
cache_get_value_name_float(idx, "X", veh_info[idx][v_pos][0]);
cache_get_value_name_float(idx, "Y", veh_info[idx][v_pos][1]);
cache_get_value_name_float(idx, "Z", veh_info[idx][v_pos][2]);
car = CreateVehicle(p_info[idx][veh_id],veh_info[idx][v_pos][0],veh_info[idx][v_pos][1],veh_info[idx][v_pos][2],90,veh_info[idx][v_color][0],veh_info[idx][v_color][1],-1);
f(string, "Владелец: %s", p_info[idx][name]);
player_owner[car] = CreateDynamic3DTextLabel(string, error, 0.0, 0.0, 0.5, 30.0, INVALID_PLAYER_ID, car, 1);
CAR++;
}
}
printf("Автомобили загружены");
return true;
}
