Help please.
#1

Im currently processing a dialog response a weird way (cant even explain it).

Is there a way to make this more efficient?

pawn Код:
if(dialogid==600)
    {
        if(!response) return 1;
        switch(listitem)
        {
            case 0:LoadPlayerCarStats(playerid,0);
            case 1:LoadPlayerCarStats(playerid,1);
            case 2:LoadPlayerCarStats(playerid,2);
            case 3:LoadPlayerCarStats(playerid,3);
            case 4:LoadPlayerCarStats(playerid,4);
            case 5:LoadPlayerCarStats(playerid,5);
            case 6:LoadPlayerCarStats(playerid,6);
            case 7:LoadPlayerCarStats(playerid,7);
            case 8:LoadPlayerCarStats(playerid,8);
            case 9:LoadPlayerCarStats(playerid,9);
            case 10:LoadPlayerCarStats(playerid,10);
            case 11:LoadPlayerCarStats(playerid,11);
            case 12:LoadPlayerCarStats(playerid,12);
            case 13:LoadPlayerCarStats(playerid,13);
        }
    }
Reply
#2

pawn Код:
if(dialogid==600)
{
    if(!response || listitem < 0) return 0;
    LoadPlayerCarStats(playerid,listitem);
    return 1;
}
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
if(dialogid==600)
{
    if(!response || listitem < 0) return 1;
    LoadPlayerCarStats(playerid,listitem);
}
Thankyou much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)