Scripting/Server/Functions/ShowPlayerDialog

Opens a dialog. dialogid is your own number 0-32767 that comes back in onDialogResponse. caption is the title bar (max 64 characters), info the body (max 4000 bytes), button1 is the left/confirm button, button2 the right/cancel button - pass "" for button2 to show a single button (ESC then does nothing). Showing a new dialog replaces the one that is open. Text colours: {RRGGBB} inside any text (PC).

Syntax

ShowPlayerDialog(player, dialogid, style, caption, info, button1, button2)

Arguments

Returns

bool (false if the player is not connected or an argument is invalid)

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "showplayerdialog" )
	{
		local result = ShowPlayerDialog( player, 0, 0, "Hello world", 0, 0, 0 );
		MessagePlayer( "ShowPlayerDialog returned: " + result, player );
	}
}

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

Section: Server dialogs (SA-MP style)

Categories: Server functions | Server dialogs (SA-MP style)