Scripting/Server/Events/onDialogResponse

The player answered a dialog opened with ShowPlayerDialog (v0.2.3+, see section 4.9). response is 1 for the left button (or Enter) and 0 for the right button (or ESC). listitem is the selected row of the list styles (the header row is not counted), -1 for the other styles. inputtext is only filled for DIALOG_STYLE_INPUT and DIALOG_STYLE_PASSWORD. The dialog is closed by any answer; show another one from the handler to chain them. Answers for a dialog id that is not the one currently shown are ignored by the server.

Syntax

onDialogResponse(player, dialogid, response, listitem, inputtext)

Arguments

Example

function onDialogResponse( player, dialogid, response, listitem, inputtext )
{
	MessagePlayer( "onDialogResponse fired", player );
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Traffic events

Categories: Server events | Traffic events