01.02.2011, 04:12
Sorry, but what does
stannd for ? Sorry, just haven't seen it before. Anyways this is what I use
or else
pawn Код:
while(mysql_fetch_row(resultline)==1)
==1//I mean this
pawn Код:
while(mysql_fetch_row(string,"|"))
{
if(mysql_num_rows() == 0) continue;
pawn Код:
//Top of script
#define LOAD_VEHICLES 1
//I call this on GamemOdeInit
Function: LoadVehicles()
{
mysql_query("SELECT * FROM `Vehicles` ORDER BY `vehicleid` ASC", LOAD_VEHICLES);
}
//under OnMysqlQuery
case LOAD_VEHICLES:
{
mysql_store_result();
new data[42][128];
while(mysql_fetch_row(string,"|"))
{
if(mysql_num_rows() == 0) continue;
explode(data, string, "|");
//printf(string);
new Carid = CreateVehicle(strval(data[1]), floatstr(data[2]), floatstr(data[3]), floatstr(data[4]), floatstr(data[5]), strval(data[6]), strval(data[7]), -1);
printf("Loading Vehicle Data id %i: %s", Carid, string);
VehicleInfo[Carid][vSQLID] = strval(data[0]);
VehicleInfo[Carid][vModel] = strval(data[1]);
//etc...