26.12.2013, 11:50
Why you choosed to use this method?
mysql_function_query(connection, query, true, "SetPlate", "dd", playerid, GetPlayerVehicleID(playerid));
You did by some tutorial or just decided it will be better as this?
I would go as this:
(First off I wouldn't use GetPlayerVehicleID(playerid) for mysql, but would use a unique carid for DB, as if you change some cars IG, your whole table goes wasted. )
Just for god sake don't use loop, if you use this method.
mysql_function_query(connection, query, true, "SetPlate", "dd", playerid, GetPlayerVehicleID(playerid));
You did by some tutorial or just decided it will be better as this?
I would go as this:
(First off I wouldn't use GetPlayerVehicleID(playerid) for mysql, but would use a unique carid for DB, as if you change some cars IG, your whole table goes wasted. )
pawn Код:
new Plate[10],veh = GetPlayerVehicleID(playerid);
format(query, sizeof(query), "SELECT `Plate` FROM `car` WHERE `tID` = '%d'",veh );
mysql_query(query);
mysql_store_result();
mysql_fetch_field("Plate",Plate);
mysql_free_result();
SetVehicleNumberPlate(veh ,Plate);