---
title: "SetPlayerSpecialAction | open.mp"
description: "This function allows to set players special action."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/SetPlayerSpecialAction
language: th
---

# SetPlayerSpecialAction

## คำอธิบาย

This function allows to set players special action.

| Name | Description |
| --- | --- |
| playerid | The player that should perform the action |
| actionid | The [action](https://omp.itsneufox.com/th/docs/scripting/resources/specialactions) that should be performed. |

## ส่งคืน

1: The function executed successfully.

0: The function failed to execute. This means the player is not connected.

## ตัวอย่าง

```c
if (strcmp(cmd, "/handsup", true) == 0)
{
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
    return 1;
}
```

## บันทึก

warning

Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death.

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   GetPlayerSpecialAction: Get a player's current special action.
-   ApplyAnimation: Apply an animation to a player.
