MySQL Load car not working
#3

Your problem is simply because you're not actually returning a vehicle id from the MySQL server. You've defined ID but not assigned any data.

So, everytime you're using ID the script is doing this:

pawn Код:
MasinosI[0][x] = Pos[0];
MasinosI[0][y] = Pos[1];
MasinosI[0][z] = Pos[2];
MasinosI[0][a] = Pos[3];
Instead of whatever ID the vehicle is. Select everything from the Cars database and make sure to assign ID a value in a loop. I'm using MySQL R33 for this example, you should really upgrade as it's way faster. You'll get the jist of it anyways:

pawn Код:
if(cache_num_rows() != 0) // Example of loading vehicles using MySQL R33. Forgot how R6 and under works.
    {
        for(new i = 0; i != cache_num_rows(); i++)
        {
            cache_get_field_content_int(i, "Value", MasinosI[i][Value]); // Fetching & Assigning Data
            cache_get_field_content_int(i, "Value", MasinosI[i][Value]); // Fetching & Assigning Data
            cache_get_field_content_int(i, "Value", MasinosI[i][Value]); // Fetching & Assigning Data
            cache_get_field_content_int(i, "Value", MasinosI[i][Value]); // Fetching & Assigning Data

            // Then go on to create the vehicle
        }
    }
Reply


Messages In This Thread
MySQL Load car not working - by DovIIs - 05.11.2014, 13:48
Re: MySQL Load car not working - by dusk - 05.11.2014, 14:04
Re: MySQL Load car not working - by sammp - 05.11.2014, 14:47
Re: MySQL Load car not working - by Vince - 05.11.2014, 15:40
Re: MySQL Load car not working - by Guest4390857394857 - 05.11.2014, 15:46
Re: MySQL Load car not working - by sammp - 05.11.2014, 20:21

Forum Jump:


Users browsing this thread: 3 Guest(s)