02.09.2016, 19:40
Hello. I have a problem with this function. Well, not with this function exactly.
I have a MySQL vehicle system. If I destroy a car, all upper id's from the destroyed cars goes -1.
So when I enter to another car, GetPlayerVehicleID don't help me because the samp id's are not the same as MySQL car id. They are created in order but if I destroy a car, the id of MySQL is the same so if I do something on antother car, obviously gets the id from GetPlayerVehicleID and changes the "destroyed" car.
Any suggestions on how I can get the MySQL id?
Example:
I do, for example, /lockcar and I can do the lock because i'm doing GetPlayerVehicleID(playerid) and in MySQL the id 4 is my car.
Anyone please? Is for a public release, credits will be keeped.
I have a MySQL vehicle system. If I destroy a car, all upper id's from the destroyed cars goes -1.
So when I enter to another car, GetPlayerVehicleID don't help me because the samp id's are not the same as MySQL car id. They are created in order but if I destroy a car, the id of MySQL is the same so if I do something on antother car, obviously gets the id from GetPlayerVehicleID and changes the "destroyed" car.
Any suggestions on how I can get the MySQL id?
Example:
Код:
User: test // Parkandhide 4 destroys the vehicle and then, using /getcarback 4 will respawn the car I destroy (using, for example /parkandhide 4) vehicleid 4, on MySQL id:4 and owner: test I enter vehicleid 4 (was vehicleid 5, but vehicle on id 4 was destroyed), on MySQL id:5 and owner: test2
Anyone please? Is for a public release, credits will be keeped.