OnDialogResponse
#2

If you want to make response to another dialog, you have to put else if(dialogid == dialogid (the ID of dialog here) and then continue with your code, like this:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 12)
        {
                if(response == 1)
                {
                   if(listitem == 0)
                        {
                            new Float:x, Float:y, Float:z, Float:a;
                            GetPlayerPos(playerid, x,y,z);
                            GetPlayerFacingAngle(playerid, a);
                            new vehicleid = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
                            PutPlayerInVehicle(playerid, vehicleid, 0);
                         }
                         if(listitem == 1)
                           {
                             new Float:x, Float:y, Float:z, Float:a;
                            GetPlayerPos(playerid, x,y,z);
                            GetPlayerFacingAngle(playerid, a);
                            new vehicleid = CreateVehicle(562, x+3,y,z, a, -1, -1, -1);
                            PutPlayerInVehicle(playerid, vehicleid, 0);

                         }
                        if(listitem == 2)
                           {
                               new Float:x, Float:y, Float:z, Float:a;
                               GetPlayerPos(playerid, x,y,z);
                               GetPlayerFacingAngle(playerid, a);
                               new vehicleid = CreateVehicle(451, x+3,y,z, a, -1, -1, -1);
                               PutPlayerInVehicle(playerid, vehicleid, 0);
                                }
                            }
                        }
        else if(dialogid == dialogiduwanthere)
        {
            //Your code here
        }
    return 1;
}

Turned out a bit messy, but not easy to work with it without the pawno
Reply


Messages In This Thread
OnDialogResponse - by NviDa - 19.04.2014, 09:30
Re: OnDialogResponse - by Blast3r - 19.04.2014, 09:53
Re: OnDialogResponse - by xVIP3Rx - 19.04.2014, 11:50

Forum Jump:


Users browsing this thread: 1 Guest(s)