Need Help
#1

Ok, ive never worked with sscanf so i tried to make a loadvehicles stock using the only way i could think of. I tried this but i did not work at all, can someone convert it to sscanf?

pawn Код:
stock LoadVehicles()
{
    new Query[255];
    for(new id; id < MA; id++)
    {
        format(Query, sizeof(Query), "SELECT * FROM vehicles WHERE id= %d", id);
        mysql_query(Query);
        mysql_store_result();
        if(mysql_num_rows())
        mysql_fetch_field("Model", vehicledata[id][Model]);
        mysql_fetch_field("x", vehicledata[id][POS][0]);
        mysql_fetch_field("y", vehicledata[id][POS][1]);
        mysql_fetch_field("z", vehicledata[id][POS][2]);
        mysql_fetch_field("a", vehicledata[id][POS][3]);
        mysql_fetch_field("Owner", vehicledata[id][Owner]);
        mysql_fetch_field("Forsale", vehicledata[id][Forsale]);
        mysql_fetch_field("Price", vehicledata[id][Price]);
        new Color1 = random(126); new Color2 = random(126);
        CreateVehicle(vehicledata[id][Model],vehicledata[id][POS][0],vehicledata[id][POS][1],vehicledata[id][POS][2],vehicledata[id][POS][3],Color1,Color2, 60*10000);
    }
}
Reply


Messages In This Thread
Need Help - by Rokzlive - 22.03.2011, 02:14
Re: Need Help - by Rokzlive - 22.03.2011, 16:20
Re: Need Help - by Cameltoe - 22.03.2011, 23:04
Re: Need Help - by Rokzlive - 22.03.2011, 23:16
Re: Need Help - by Cameltoe - 22.03.2011, 23:40

Forum Jump:


Users browsing this thread: 1 Guest(s)