02.02.2014, 10:09
Okay this is the function:
And the console gives out this when loading which i find kind of weird:
pawn Код:
House_GetFreeCarSlot(HouseID)
{
new MaxCarSlots = House_GetMaxCarSlots(HouseID);
printf( "House_GetFreeCarSlot::MaxCarSlots = %d", MaxCarSlots );
for (new CarSlot; CarSlot < MaxCarSlots; CarSlot++)
{
printf( "House_GetFreeCarSlot::if(AHouseData[%d][VehicleIDs][%d] == 0 | Result: %d)", HouseID, CarSlot, AHouseData[HouseID][VehicleIDs][CarSlot] );
if (AHouseData[HouseID][VehicleIDs][CarSlot] == 0)
{
print( "House_GetFreeCarSlot::CarSlot is 0" );
return CarSlot;
}
}
return -1;
}
Код:
[12:21:25] There are rows - Vehicles [12:21:25] ccol1: 0, ccol2: 1 [12:21:25] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 [12:21:25] House_AddVehicle(3,480,-1986.920043,270.180999,35.010898,265.811004,0,1, 3); [12:21:25] House_GetFreeCarSlot::MaxCarSlots = 10 [12:21:25] House_GetFreeCarSlot::if(AHouseData[3][VehicleIDs][0] == 0 | Result: 0) [12:21:25] House_GetFreeCarSlot::CarSlot is 0 [12:21:25] House_AddVehicle::CarSlot = 0 [12:21:25] No free carslot [12:21:25] Car loaded [12:21:25] OnPlayerHousesVehiclesLoad::houseid_ = 4 [12:21:25] There are rows - Vehicles [12:21:25] ccol1: 0, ccol2: 1 [12:21:25] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 [12:21:25] House_AddVehicle(4,480,-1986.920043,270.180999,35.010898,265.811004,0,1, 3); [12:21:25] House_GetFreeCarSlot::MaxCarSlots = 10 [12:21:25] House_GetFreeCarSlot::if(AHouseData[4][VehicleIDs][0] == 0 | Result: 0) [12:21:25] House_GetFreeCarSlot::CarSlot is 0 [12:21:25] House_AddVehicle::CarSlot = 0 [12:21:25] No free carslot [12:21:25] Car loaded