Poftim
function loadApartments( )
{
new id; serverApartments = cache_num_rows( );
for( new i, j = cache_get_row_count( ); i != j; i++ )
{
id = cache_get_field_content_int( i, "ID" );
apartmentsVariables[ id ][ apUser ] = cache_get_field_content_int( i, "UserID" );
apartmentsVariables[ id ][ apValue ] = cache_get_field_content_int( i, "Value" );
apartmentsVariables[ id ][ apSell ] = cache_get_field_content_int( i, "Sell" );
apartmentsVariables[ id ][ apPos ][ 0 ] = cache_get_field_content_float( i, "X" );
apartmentsVariables[ id ][ apPos ][ 1 ] = cache_get_field_content_float( i, "Y" );
apartmentsVariables[ id ][ apPos ][ 2 ] = cache_get_field_content_float( i, "Z" );
apartmentsVariables[ id ][ apPos ][ 3 ] = cache_get_field_content_float( i, "Angle" );
apartmentsVariables[ id ][ apLabel ] = CreateDynamic3DTextLabel( "", -1, apartmentsVariables[ id ][ apPos ][ 0 ], apartmentsVariables[ id ][ apPos ][ 1 ], apartmentsVariables[ id ][ apPos ][ 2 ], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0 );
refresh_apartment_label( id );
cache_get_field_content( i, "Owner", apartmentsVariables[ id ][ apOwner ], SQL, 130 );
}
}