public OnDialogResponse
#2

That code is completely wrong, You should read some documentation about OnDialogResponse

Try this
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1337)
    {
        if(!response)
        {
            SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
            return 1; // We processed it
        }
        if(response)
        {
            switch(listitem) // This is far more efficient than using an if-elseif-else structure
            {
                case 0: // Listitems start with 0, not 1
                {
                    GetPlayerPos(playerid, x, y, z);
                    CreateVehicle(603, x, y, z, 0, -1, -1, 60);
                    SendClientMessage(playerid, red, "You have spawned a Phoenix ID: 603");
                }
                case 1:
                {
                    GetPlayerPos(playerid, x, y, z);
                    CreateVehicle(506, x, y, z, 0, -1, -1, 60);
                }
                case 2:
                {
                    GetPlayerPos(playerid, x, y, z);
                    CreateVehicle(532, x, y, z, 0, -1, -1, 60);
                }
            }
        }
    }
    return 1; // If you put return 1 here the callback will not continue to be called in other scripts (filterscripts, etc.).
}
Reply


Messages In This Thread
public OnDialogResponse - by [SU]Fnugski - 29.12.2010, 20:57
Re: public OnDialogResponse - by Sinner - 29.12.2010, 21:08
Re: public OnDialogResponse - by DVDK - 29.12.2010, 21:15
Re: public OnDialogResponse - by Jochemd - 29.12.2010, 21:25
Re: public OnDialogResponse - by [SU]Fnugski - 29.12.2010, 21:37
Re: public OnDialogResponse - by Jochemd - 29.12.2010, 21:39
Re: public OnDialogResponse - by Sinner - 30.12.2010, 09:40

Forum Jump:


Users browsing this thread: 3 Guest(s)