20.12.2013, 13:39
Try this
And in
use "SELECT `LastDriver` FROM ....
So you can use more simple
mysql_fetch_row(name);
format(string, sizeof(string), "The last driver of this %s was {FF0000}%s{FFFFFF}", GetVehicleName(GetPlayerVehicleID(playerid)), name);
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
new query[512], vehicleid2;
format(query, sizeof(query), "UPDATE `vehicles` SET `LastDriver`=%s WHERE `VehicleID`=%d", pName(playerid), vehicleid2);
mysql_query(query);
}
pawn Код:
format(query, sizeof(query), "SELECT * FROM `vehicles` WHERE `LastDriver` = '%s' AND `VehicleID` = sha1('%s')", vehicleid);
mysql_query(query);
So you can use more simple
mysql_fetch_row(name);
format(string, sizeof(string), "The last driver of this %s was {FF0000}%s{FFFFFF}", GetVehicleName(GetPlayerVehicleID(playerid)), name);