28.10.2010, 16:34
Hi, i got a problem with MYSQL car loading. Using R5 MYSQL plugin and trying to do this:
AND:
What's wrong with that? It won't create car.
Код:
enum Cars { Id, Owner, Model, Float:X, Float:Y, Float:Z, Float:Angle, HP, Fuel, Color1, Color2, Lock, tune0, tune1, tune2, tune3, tune4, tune5, tune6, tune7, tune8, tune9, tune10, tune11, tune12, } new vInfo[MAX_VEHICLES][Cars];
Код:
for(new i; i < MAX_VEHICLES; i++) { new FetchLine[256]; mysql_query("SELECT * FROM vehicles WHERE ID = '%d'",i); mysql_store_result(); if(mysql_fetch_row_format(FetchLine,"|")) { printf("%s", FetchLine); sscanf(FetchLine, "p<|>e<isdffffdddddddddddddddddd>",vInfo[i][Id],vInfo[i][Owner],vInfo[i][Model],vInfo[i][X],vInfo[i][Y],vInfo[i][Z],vInfo[i][Angle],vInfo[i][HP],vInfo[i][Fuel],vInfo[i][Color1],vInfo[i][Color2],vInfo[i][Lock],vInfo[i][tune0],vInfo[i][tune1],vInfo[i][tune2],vInfo[i][tune3],vInfo[i][tune4],vInfo[i][tune5],vInfo[i][tune6],vInfo[i][tune7],vInfo[i][tune8],vInfo[i][tune9],vInfo[i][tune10],vInfo[i][tune11],vInfo[i][tune12]); CreateVehicle(vInfo[i][Model],vInfo[i][X],vInfo[i][Y],vInfo[i][Z],vInfo[i][Angle],vInfo[i][Color1],vInfo[i][Color2],0); printf("%s", FetchLine); } }