[HELP]What is wrong?
#1

What is wrong with this?
the dialog:
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Job List","Kidnapper\nCar Jacker\nDrugs Dealer","Ok","Cancel");
the OnDialogResponse:
pawn Код:
if(dialogid == 1)
      {
        if(!response){SendClientMessage(playerid, COLOR_RED, "You canceled! typ /chosejob for chose your job another time");
        new message[196];
        format(message,sizeof(message), "Your job is now %s", inputtext);
        SendClientMessage(playerid, COLOR_BLUE, message);
        if(listitem == 1)
        {
                    PlayerInfo[playerid][pJob] = 3;
                }
                if(listitem == 2)
                {
                  PlayerInfo[playerid][pJob] = 4;
                }
                if(listitem == 3)
                {
                  PlayerInfo[playerid][pJob] = 5;
                }
            }
Reply
#2

Listitem's start till starts from 0. So, first option is listitem == 0
Код:
if(listitem == 0)
{
// Kidnapper
}
if(listitem == 1)
{
// Car jacker
}
if(listitem == 2)
{
// Drugs dealer
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)