Moin Leute,
wenn ich meine Autos so lade, also aus der Datenbank:
stock Autosladen()
{
new Query[1024], id, i = 1;
GeladeneAutos = 0;
format(Query, sizeof(Query), "SELECT * FROM vehicles");
mysql_query(Query);
mysql_store_result();
while(mysql_fetch_row_format(Query,"|"))
{
id = i;
sscanf(Query, "p<|>e<is[25]iiiffff>", VehicleInfo[id]);
new Color1 = random(126); new Color2 = random(126);
CreateVehicle(VehicleInfo[id][Model],VehicleInfo[id][Pos][Auto_X],VehicleInfo[id][Pos][Auto_Y],VehicleInfo[id][Pos][Auto_Z],VehicleInfo[id][Pos][Auto_A],Color1,Color2, 60*10000);
i++;
GeladeneAutos++;
//printf("%d | %f | %f | %f | %f | %s",VehicleInfo[id][Model],VehicleInfo[id][Pos][Auto_X],VehicleInfo[id][Pos][Auto_Y],VehicleInfo[id][Pos][Auto_Z],VehicleInfo[id][Pos][Auto_A],VehicleInfo[id][Owner]);
}
}
Kann ich sie auch so speichern indem ich dieses SELECT * FROM vehicles in UPDATE vehicles SET änder? Oder wie sonst.
mfg.