Problem getting variable from MySQL, again
#2

pawn Код:
forward CargarVeh(limit);
public CargarVeh(limit)
{
    new h, rows, data[50], team;
    cache_get_row_count(rows);
    for(new i = 0; i < rows; i++)
    {
        if(h >= limit)
        {
            print("Limite de vehнculos excedido!");
            break;
        }
        cache_get_value_name(i, "idTeam", data); object[h][idTeam] = strval(data);
        cache_get_value_name(i, "modelo", data); object[h][modelo] = strval(data);
        cache_get_value_name(i, "posx", data); object[h][posx] = floatstr(data);
        cache_get_value_name(i, "posy", data); object[h][posy] = floatstr(data);
        cache_get_value_name(i, "posz", data); object[h][posz] = floatstr(data);
        cache_get_value_name(i, "posrot", data); object[h][posrot] = floatstr(data);
        cache_get_value_name(i, "color1", data); object[h][color1] = strval(data);
        cache_get_value_name(i, "color2", data); object[h][color2] = strval(data);

        object[h][idTeam] = AddStaticVehicle(object[h][modelo], object[h][posx], object[h][posy], object[h][posz], object[h][posrot], object[h][color1], object[h][color2]);
        printf("Vehiculo con idTeam %i, pos x: %i pos y: %i pos z: %i creado", object[h][idTeam], object[h][posx], object[h][posy], object[h][posz]);
        h++;
    }
    printf("Vehiculos cargados: %d",h);
    return 1;
}
and change %i to %f in pos
Reply


Messages In This Thread
Problem getting variable from MySQL, again - by dabv_astur - 18.11.2018, 22:36
Re: Problem getting variable from MySQL, again - by Jefff - 18.11.2018, 23:26
Re: Problem getting variable from MySQL, again - by dabv_astur - 19.11.2018, 01:52
Re: Problem getting variable from MySQL, again - by Jefff - 19.11.2018, 02:10
Re: Problem getting variable from MySQL, again - by dabv_astur - 19.11.2018, 02:24
Re: Problem getting variable from MySQL, again - by Rolux - 19.11.2018, 04:12
Re: Problem getting variable from MySQL, again - by dabv_astur - 19.11.2018, 05:54

Forum Jump:


Users browsing this thread: 2 Guest(s)