21.12.2012, 19:07
Probalo de esta manera.
pawn Код:
stock VScopeCargar()
{
new query[300], string[128];
new contar;
for(new i=1; i < MAXIMO_VEHICULOS; i++)
{
format(query, sizeof(query), "SELECT * FROM vehiculos WHERE id = '%d'", i);
mysql_query(query);
if(mysql_store_result()) {
//while(mysql_fetch_row_format(query,"|"))
//{
mysql_fetch_field_row(string,"modelo"); VScope[i][vmodelo] = strval(string);
mysql_fetch_field_row(string,"x"); VScope[i][vx] = floatstr(string); //strval(string);
mysql_fetch_field_row(string,"y"); VScope[i][vy] = floatstr(string); //strval(string);
mysql_fetch_field_row(string,"z"); VScope[i][vz] = floatstr(string); //strval(string);
mysql_fetch_field_row(string,"a"); VScope[i][va] = floatstr(string); //strval(string);
mysql_fetch_field_row(string,"color1"); VScope[i][vcolor1] = strval(string);
mysql_fetch_field_row(string,"color2"); VScope[i][vcolor2] = strval(string);
mysql_fetch_field_row(VScope[i][vpropietario],"propietario"); //VScope[i][vpropietario] = strval(string);
mysql_fetch_field_row(string,"precio"); VScope[i][vprecio] = strval(string);
contar++;
SpawnearVehiculo(i);
mysql_free_result();
//}
}
}
printf("VScope: %d vehiculos cargados.", contar);
}