---
title: "GetPlayerDialogID | open.mp"
description: "Get the ID of the dialog currently show to the player."
canonical: https://omp.itsneufox.com/docs/scripting/functions/GetPlayerDialogID
language: en
---

# GetPlayerDialogID

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

## Description

Get the ID of the dialog currently show to the player.

| Name | Description |
| --- | --- |
| playerid | The ID of the player. |

## Return Values

Returns the dialog ID.

Or **INVALID\_DIALOG\_ID** if the player is not connected or has no dialog open.

## Examples

```c
new dialogID = GetPlayerDialogID(playerid);
if (dialogID != INVALID_DIALOG_ID)
{
    // The player has an open dialog
}
```

## Related Functions

-   [GetPlayerDialogData](https://omp.itsneufox.com/docs/scripting/functions/GetPlayerDialogData): Get the data of the dialog currently show to the player.
-   [ShowPlayerDialog](https://omp.itsneufox.com/docs/scripting/functions/ShowPlayerDialog): Shows the player a synchronous (only one at a time) dialog box.

## Related Callbacks

-   [OnDialogResponse](https://omp.itsneufox.com/docs/scripting/callbacks/OnDialogResponse): Called when a player responds to a dialog.
