12.10.2012, 04:32
Alright im just scripting around, and I ran into an issue.. I can't figure out how to get a vehicle ID from the mysql query.. For example..
Normally I would throw a
In there, but since Im not use a loop to load all vehicles, I honestly have no idea on how to get the vehicle id from the query I just did, Any help would be appreciated.
pawn Код:
CMD:vehicleinfo(playerid,params[])
{
new string[128];
new plate[11];
new query[400];
if(sscanf(params, "s[11]", plate)) return SendClientMessage(playerid, COLOR_RED, "> The correct usage of this command would be: /vehicleinfo vehicleplate");
format(query, sizeof(query), "SELECT * FROM Vehicles WHERE Plate = '%s'", plate);
mysql_query(query);
mysql_store_result();
return 1;
}
pawn Код:
sscanf(Query, "p<|>e<idffffddds[11]ddds[24]ddd>", Vehicles[id]);