Vehicle spawning with MySQL
#6

Quote:
Originally Posted by KevinExec
Посмотреть сообщение
I like the idea and everything, how did you make the click counts if I can ask?
Very simply. I have a custom function (CreatePlayerVehicle(playerid, modelid);) to spawn vehicles for players. Included under this function is just a simple MySQL query:
Код:
"UPDATE `vehicles` SET spawns=spawns+1 WHERE model_id = [model ID of the vehicle the player spawned]"
Then, when the top vehicles dialog is loaded, it just sorts the vehicles by "spawns" descending and limits the results to 10, then it's just a case of formatting it for the dialog.
Reply


Messages In This Thread
Vehicle spawning with MySQL - by dicknyson - 31.05.2016, 15:40
Re: Vehicle spawning with MySQL - by Luis- - 31.05.2016, 15:50
Re: Vehicle spawning with MySQL - by iKevin - 31.05.2016, 16:08
Re: Vehicle spawning with MySQL - by Luis- - 31.05.2016, 16:17
Re: Vehicle spawning with MySQL - by Ritzy2K - 31.05.2016, 16:31
Re: Vehicle spawning with MySQL - by dicknyson - 31.05.2016, 16:32
Re: Vehicle spawning with MySQL - by Lordzy - 31.05.2016, 16:33
Re: Vehicle spawning with MySQL - by dicknyson - 31.05.2016, 16:43
Re: Vehicle spawning with MySQL - by Boar - 04.06.2016, 16:31
Re: Vehicle spawning with MySQL - by SickAttack - 04.06.2016, 17:02

Forum Jump:


Users browsing this thread: 1 Guest(s)