Help with converting this (?)
#1

Can someone tell me how can I use ternary operators for this code? I tried but ended up with errors lol.

PHP код:
if (_house_HasVehicles(houseid))
{
    for (new 
0MAX_PLAYER_VEHICLESji++)
    {
        if (
g_HouseData[houseid][h_pVehs][i])
        {
            
idx vehicle_ReturnIndex(GetVehicleModel(g_HouseData[houseid][h_pVehs][i]));
            if (
g_VehicleData[g_HouseData[houseid][h_pVehs][i]][v_Parked])
                
format(list, sizeof(list), "%s%s\tParked\n", list, g_DealerCars[idx][car_Name]);
            else
                
format(list, sizeof(list), "%s%s\tUnparked\n", list, g_DealerCars[idx][car_Name]);
        }
        else
            
format(list, sizeof(list), "%sEmpty\n", list);
    }
    
format(list, sizeof(list), "Vehicle\tStatus\n%s", list);
    
ShowPlayerDialog(playeridD_UNPARKEDVEHICLESDIALOG_STYLE_TABLIST_HEADERS"Your vehicles", list, "Select""Back");

Or if it's not possible, then are there any better ways to format this list? This right now just works fine but I am just looking for other ways if there's any. Which is probably better than this.
Reply


Messages In This Thread
Help with converting this (?) - by Sjn - 24.06.2016, 17:52
Re: Help with converting this (?) - by Stinged - 24.06.2016, 17:58
Re: Help with converting this (?) - by Sjn - 24.06.2016, 19:06
Re: Help with converting this (?) - by Stinged - 24.06.2016, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)