View Single Post
Old 03/02/2020, 03:16 PM   #10
Little Clucker
Join Date: Jul 2016
Location: EX-YU
Posts: 40
Reputation: 51
Default Re: MySQL load vehicles issue

Originally Posted by Kwarde View Post
I still think you're mixing up the vehicle server ID and the vehicle mysql ID (ID and CarID) somewhere.

Do you refer to this line?:
CarInfo[j][cCarID] = NBC_AddStaticVehicleEx(CarInfo[j][cModel], CarInfo[j][cLocationx]...
Because that does not set a vehicle ID. It merely creates a vehicle and sets CarInfo[*][cCarID] to the ID of the newly created vehicle. Storing and loading that data (CarID) is really just a waste of space because you store it, load it, and then overwrite it again.
I have 2 variable for vehicles.

First is:
PHP Code:
new ownedcar[sizeof(CarInfo)]; 
Second is when i buy the car

PHP Code:
new car 1;
1sizeof(CarInfo); h++)
CarInfo[h][cOwned] == 0)
car h;
CarInfo[car][cCarID] = car;
ownedcar[car] = NBC_AddStaticVehicleEx(CarInfo[car][cModel], CarInfo[car][cLocationx], CarInfo[car][cLocationy], CarInfo[car][cLocationz], CarInfo[car][cAngle], 11600000); 
For loading it must be:
PHP Code:
for(new 1sizeof(CarInfo); h++)
CarInfo[h][cOwned] == || CarInfo[h][cModel] == 0)
ownedcar[h] = NBC_AddStaticVehicleEx(510,-804.5384,3791.8506,39.4313+h,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],600000);
ownedcar[h] = NBC_AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],600000);

Yes i mixing up the vehicle server ID and the vehicle mysql ID (ID and CarID) somewhere, but where.. Only in loading.
I tryed on 1000 ways using CarInfo loop, and sometimes ID of Vehicle is 1000, or less.
OsmanMalagic is offline   Reply With Quote