OnDialogResponse is not working!
#3

Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
Have you tried to add a debug message like this:
PHP код:
printf"OnPlayerDialog: %i %i %i %i %s"playeriddialogidresponselistiteminputtext ); 
Inside your OnDialogResponse callback? Just for further debugging and to see if the dialog is called.
I did it and nothing was shown in the server console, but I don't know if I did it the right way. Here is the modified OnDialogResponse:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            switch(listitem)
            {
                case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
                case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
                case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
            }
        }
        printf("OnPlayerDialog: %i %i %i %i %s", playerid, dialogid, response, listitem, inputtext);
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }

    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
Reply


Messages In This Thread
OnDialogResponse is not working! - by Manwelb6 - 21.02.2017, 21:35
Re: OnDialogResponse is not working! - by iKarim - 22.02.2017, 05:09
Re: OnDialogResponse is not working! - by Manwelb6 - 22.02.2017, 10:44
Re: OnDialogResponse is not working! - by SloProKiller - 22.02.2017, 11:33
Re: OnDialogResponse is not working! - by Threshold - 22.02.2017, 11:47
Re: OnDialogResponse is not working! - by Manwelb6 - 22.02.2017, 15:06

Forum Jump:


Users browsing this thread: 3 Guest(s)