04.03.2012, 18:04
Hey, I'm new to SA:MP programming, but I have some experience with PHP and Mysql programming.
I'm using Vortex gamemode and I'm having a problem with the cars.
So, the vehicles table contains the rows id, x, y, z and some other stuff..
What I'm trying to do is everytime the gamemode starts (ongamemodeinit or something.. ) to have the ids of the cars ordered. So, if I have 5 cars with the ids 1, 2, 4, 6 and 11, I want the ids to be updated to 1, 2, 3, 4 and 5.
I need a function like:
I tried doing that for a few hours and.. nothing.
Can someone please help me?
Thanks!
I'm using Vortex gamemode and I'm having a problem with the cars.
So, the vehicles table contains the rows id, x, y, z and some other stuff..
What I'm trying to do is everytime the gamemode starts (ongamemodeinit or something.. ) to have the ids of the cars ordered. So, if I have 5 cars with the ids 1, 2, 4, 6 and 11, I want the ids to be updated to 1, 2, 3, 4 and 5.
I need a function like:
Код:
stock updatecarid(){ while(something){ // update the cars ids! } }
Can someone please help me?
Thanks!