Enum help displaying on ClientMessage
#5

pawn Код:
stock ShowBuyableVehicles(playerid)
{
    new str[128];
    for(new i = 0; i != sizeof(CarsPrices); i+=3)
    {
        for(new j = 0; j != 4 && i + j < sizeof(CarsPrices); ++j) {
            format(str, sizeof(str), "%s[ %s: %d , $%d ] ", str, VehicleNames[CarsPrices[i+j][dCarModel]-400], CarsPrices[i][dCarModel], CarsPrices[i][dCarPrice]);
        }
        SCM(playerid, COLOR_WHITE, str);
    }
}
#e2: In fact, why not just

pawn Код:
stock ShowBuyableVehicles(playerid)
{
    new str[128];
    for(new i = 0; i != sizeof(CarsPrices); ++i)
    {
        if(0 == i % 4 && i != 0) {
            SCM(playerid, COLOR_WHITE, str);
            str[0] = EOS;
        }
        format(str, sizeof(str), "%s[ %s: %d , $%d ] ", VehicleNames[CarsPrices[i+j][dCarModel]-400], CarsPrices[i][dCarModel], CarsPrices[i][dCarPrice]);
    }
}
Reply


Messages In This Thread
Enum help displaying on ClientMessage - by PaulDinam - 22.03.2013, 16:58
Re: Enum help displaying on ClientMessage - by Misiur - 22.03.2013, 17:37
Re: Enum help displaying on ClientMessage - by PaulDinam - 22.03.2013, 17:43
Re: Enum help displaying on ClientMessage - by Scrillex - 22.03.2013, 17:44
Re: Enum help displaying on ClientMessage - by Misiur - 22.03.2013, 17:51

Forum Jump:


Users browsing this thread: 5 Guest(s)