OnDialogResponse
#1

Код:
CMD:t(playerid, params[])
{
    if(gCommandsDisabled[playerid]==true)
	{
THIS LINE->ShowPlayerDialog(playerid, DIALOG_CANT, DIALOG_STYLE_MSGBOX, "Error", "You are in DM. You can't use teleport", "Leave", "Stay"); <----------------- This line
	return 1;
	}
    ShowPlayerDialog(playerid, DIALOG_TELES, DIALOG_STYLE_LIST, "Teleport Menu", "Los Santos (/ls)\nSan Fiero (/sf)\nLas Venturas (/lv)\nTuning \nAirports \nStunts \nDeathMatches", "Choose", "Cancel");
	return 1;
}
If player press "Leave" - He will die (And respawn again normally)
If player press "Stay" - Dialog will close(No changes)

How to make this a dialogresponse
Код:
ShowPlayerDialog(playerid, DIALOG_CANT, DIALOG_STYLE_MSGBOX, "Error", "You are in DM. You can't use teleport", "Leave", "Stay");
Even if its in a command. If possible.
Reply
#2

I just Solved:

Код:
if(dialogid == DIALOG_EVADE)
    {
        if(response)
        {
            SetPlayerHealth(playerid, 0);
        }
        else
        {

        }
        return 1;
    }

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)