Getting vehicle ID from a mysql query
#1

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..


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;
}
Normally I would throw a
pawn Код:
sscanf(Query, "p<|>e<idffffddds[11]ddds[24]ddd>", Vehicles[id]);
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.
Reply


Messages In This Thread
Getting vehicle ID from a mysql query - by Abreezy - 12.10.2012, 04:32
Re: Getting vehicle ID from a mysql query - by ReneG - 12.10.2012, 04:48
Re: Getting vehicle ID from a mysql query - by Abreezy - 12.10.2012, 04:52
Re: Getting vehicle ID from a mysql query - by ReneG - 12.10.2012, 05:10
Re: Getting vehicle ID from a mysql query - by Abreezy - 12.10.2012, 05:33

Forum Jump:


Users browsing this thread: 1 Guest(s)