06.02.2017, 05:08
remove that for loop also it stops you from spawning more than the max pvehicle.
[EDIT]
This is also an important one don't set the new i = 0; it will load from zero let it load from null to load the first vehicle. Which is ID 0 if it's equals zero it will skip 0 which is the id of the first car and start with ID 1 which is the second car
[EDIT2]
To explain that part the for loop reads the variable the way you set it. Since you set it from zero it will read the variable as 0 Now it will look at if its less than the max vehicle you set which is eight or for me the rows of cars on the database. Then it will say oh yes its less than maximum the scripter set. okay let's add one so either i++ than having 0 as first to read.
It will read 1.
PHP код:
new rows;
use cache_get_row_count(rows);
if(rows)
{
for(new i; i < rows; i++)
// your code here
}
This is also an important one don't set the new i = 0; it will load from zero let it load from null to load the first vehicle. Which is ID 0 if it's equals zero it will skip 0 which is the id of the first car and start with ID 1 which is the second car
[EDIT2]
To explain that part the for loop reads the variable the way you set it. Since you set it from zero it will read the variable as 0 Now it will look at if its less than the max vehicle you set which is eight or for me the rows of cars on the database. Then it will say oh yes its less than maximum the scripter set. okay let's add one so either i++ than having 0 as first to read.
It will read 1.