---
title: "RemovePlayerWeapon | open.mp"
description: "یک اسلحه مشخص رو از بازیکن حذف می‌کنه."
canonical: https://omp.itsneufox.com/fa/docs/scripting/functions/RemovePlayerWeapon
language: fa
---

# RemovePlayerWeapon

هشدار

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

## توضیحات

یک اسلحه مشخص رو از بازیکن حذف می‌کنه.

| نام | توضیح |
| --- | --- |
| playerid | ID بازیکنی که می‌خوایم اسلحه‌ش رو حذف کنیم. |
| WEAPON:weaponid | [ID اسلحه](https://omp.itsneufox.com/fa/docs/scripting/resources/weaponids) که می‌خوایم حذف کنیم. |

## مقادیر بازگشتی

**true** - function با موفقیت اجرا شد.

**false** - اجرای function ناموفق بوده. یعنی بازیکن متصل نیست.

## مثال‌ها

```c
RemovePlayerWeapon(playerid, WEAPON_DEAGLE); // Desert-Eagle ro az bazikon hazf mikone
```

## توابع مرتبط

-   [GivePlayerWeapon](https://omp.itsneufox.com/fa/docs/scripting/functions/GivePlayerWeapon): به بازیکن اسلحه می‌ده.
-   [ResetPlayerWeapons](https://omp.itsneufox.com/fa/docs/scripting/functions/ResetPlayerWeapons): تمام اسلحه‌ها رو از بازیکن حذف می‌کنه.
-   [SetPlayerArmedWeapon](https://omp.itsneufox.com/fa/docs/scripting/functions/SetPlayerArmedWeapon): اسلحه مسلح بازیکن رو تنظیم می‌کنه.
-   [GetPlayerWeapon](https://omp.itsneufox.com/fa/docs/scripting/functions/GetPlayerWeapon): چک می‌کنه که بازیکن فعلا چه اسلحه‌ای در دست داره.

## منابع مرتبط

-   [Weapon IDs](https://omp.itsneufox.com/fa/docs/scripting/resources/weaponids)
