---
title: "GetPlayerSpecialAction | open.mp"
description: "Retrieves a player's current special action."
canonical: https://omp.itsneufox.com/docs/scripting/functions/GetPlayerSpecialAction
language: en
---

# GetPlayerSpecialAction

## Description

Retrieves a player's current special action.

| Name | Description |
| --- | --- |
| playerid | The ID of the player to get the special action of. |

## Returns

The special action of the player (see: [Special Actions](https://omp.itsneufox.com/docs/scripting/resources/specialactions)).

## Examples

```c
public OnPlayerUpdate(playerid)
{
    // Ban players if they have a jetpack
    if (GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
    {
        Ban(playerid);
    }
    return 1;
}
```

## Related Functions

-   [SetPlayerSpecialAction](https://omp.itsneufox.com/docs/scripting/functions/SetPlayerSpecialAction): Set a player's special action.
-   [GetPlayerState](https://omp.itsneufox.com/docs/scripting/functions/GetPlayerState): Get a player's current state.

## Related Resources

-   [Special Action IDs](https://omp.itsneufox.com/docs/scripting/resources/specialactions)
