06.02.2015, 12:14
Help fix please 
Load all normal...

Value ID 0 - vehicle.When use this function (Screen):

Load all normal...

Value ID 0 - vehicle.When use this function (Screen):
Код:
Vehicle[GetPlayerVehicleID(playerid)][ID][3]
Код:
public OnLoadVehicle();
public OnLoadVehicle()
{
new count = GetTickCount();
print("------------------------");
for(new r = 0; r < cache_num_rows(); ++r)
{
Vehicle[r][ID][0] = cache_get_field_content_int(r, "vehicle_id", MySQL);
Vehicle[r][ID][1] = cache_get_field_content_int(r, "fraction_id", MySQL);
Vehicle[r][ID][2] = cache_get_field_content_int(r, "vehicle_carid", MySQL);
Vehicle[r][Pos][0] = cache_get_field_content_float(r, "vehicle_pos1", MySQL);
Vehicle[r][Pos][1] = cache_get_field_content_float(r, "vehicle_pos2", MySQL);
Vehicle[r][Pos][2] = cache_get_field_content_float(r, "vehicle_pos3", MySQL);
Vehicle[r][Pos][3] = cache_get_field_content_float(r, "vehicle_pos4", MySQL);
Vehicle[r][Color][0] = cache_get_field_content_int(r, "vehicle_color1", MySQL);
Vehicle[r][Color][1] = cache_get_field_content_int(r, "vehicle_color2", MySQL);
cache_get_field_content(r, "vehicle_plate", Vehicle[r][Plate] ,MySQL, 32);
Vehicle[r][ID][3] = AddStaticVehicleEx(Vehicle[r][ID][2], Vehicle[r][Pos][0],Vehicle[r][Pos][1],Vehicle[r][Pos][2],Vehicle[r][Pos][3], Vehicle[r][Color][0], Vehicle[r][Color][1],600);
Vehicle[r][label] = CreateDynamic3DTextLabel(Vehicle[r][Plate], -1, 0.0, 0.0, 1.0, 50.0, INVALID_PLAYER_ID, Vehicle[r][ID][3]);
printf("| VehicleID: %i | Fraction: %i | Vehicle Car: %i | Vehicle Global: %i |", Vehicle[r][ID][0],Vehicle[r][ID][1],Vehicle[r][ID][2],Vehicle[r][ID][3]);
SetVehicleNumberPlate(Vehicle[r][ID][3], Vehicle[r][Plate]);
++ exMAX_VEHICLES;
}
printf("[Rows: %d (%d), Time: %d ms]",cache_num_rows(),exMAX_VEHICLES, GetTickCount() - count);
print("------------------------");
return 1;
}


