Cant add more cars here
#5

example with strcat

pawn Код:
case 0://Sports Cars
{
    new pDialog[800]; //change if you increase the cars
    strcat(pDialog, "Vehicle: Infernus - Price: $2M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Bullet - Price: $2M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Comet - Price: $2M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Banshee - Price: $1M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Super-GT - Price: $1M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Sultan - Price: $800K\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Cheetah - Price: $5M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Turismo - Price: $5M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Stretch - Price: $8M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Hotknife - Price: $6M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Blade - Price: $2M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Jester - Price: $2M\n", sizeof(pDialog));
    strcat(pDialog, "Vehicle: Elegy - Price: $800K", sizeof(pDialog));
    ShowPlayerDialog(playerid, NVM_CARS, DIALOG_STYLE_LIST, "{FFFFFF}New Vegas Motors - Sports Cars", pDialog, "Buy", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == NVM_CARS)
    {
        if(response == 1)
        {
            switch(listitem)
            {
                case 0:
                {
                                  //Here Code
                }
                case 1:
                {
                                //Here Code
                }
                case 2:
                {
                                //Here Code
                }
                case 3:
                {
                               //Here Code
                }
                case 4:
                {
                              //Here Code
                }
                case 5:
                {
                            //Here Code
                }
                case 6:
                {
                            //Here Code
                }
                case 7:
                {
                            //Here Code
                }
                case 8:
                {
                            //Here Code
                }
                case 9:
                {
                            //Here Code
                }
                case 10:
                {
                            //Here Code
                }
                case 11:
                {
                            //Here Code
                }
                case 12:
                {
                            //Here Code
                }
            }
        }
        if(response == 0) return 0;
    }
    return 1;
}
Reply


Messages In This Thread
Cant add more cars here - by killing - 23.07.2014, 08:56
Re: Cant add more cars here - by LivingLikeYouDo - 23.07.2014, 09:01
Re: Cant add more cars here - by killing - 23.07.2014, 09:03
Re: Cant add more cars here - by Clad - 23.07.2014, 09:11
Re: Cant add more cars here - by IceBilizard - 23.07.2014, 09:21
Re: Cant add more cars here - by William_McKnight - 23.07.2014, 09:28

Forum Jump:


Users browsing this thread: 1 Guest(s)