20.12.2013, 14:57
pawn Код:
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
new query[512],vehicleid2;
vehicleid2 = vSQLID[vehicleid]; // Wherever you store the SQL ID
format(query,sizeof(query),"UPDATE `vehicles` SET `LastDriver` = '%s' WHERE `VehicleID` = '%d'",pName(playerid),vehicleid2);
mysql_query(query);
mysql_free_result();
}