---
title: "PlayerTextDrawUseBox | open.mp"
description: "جعبه روی یک player textdraw رو فعال/غیرفعال می‌کنه."
canonical: https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawUseBox
language: fa
---

# PlayerTextDrawUseBox

## توضیحات

جعبه روی یک player textdraw رو فعال/غیرفعال می‌کنه.

| نام | توضیحات |
| --- | --- |
| playerid | ID بازیکنی که جعبه textdraw اون باید فعال/غیرفعال بشه |
| PlayerText:textid | ID player textdraw که جعبه‌اش باید فعال/غیرفعال بشه |
| bool:boxEnabled | **true** برای استفاده از جعبه یا **false** برای عدم استفاده از جعبه |

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

این تابع هیچ مقدار خاصی برنمی‌گردونه.

## مثال‌ها

```c
new PlayerText:gMyTextdraw[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    gMyTextdraw[playerid] = CreatePlayerTextDraw(playerid, 40.0, 140.0, "_~N~Example text!~N~_");
    PlayerTextDrawUseBox(playerid, gMyTextdraw[playerid], true);
    PlayerTextDrawBoxColor(playerid, gMyTextdraw[playerid], 0x00000066); // Set the box color to a semi-transparent black
    return 1;
}
```

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

-   [CreatePlayerTextDraw](https://omp.itsneufox.com/fa/docs/scripting/functions/CreatePlayerTextDraw): ساخت یک player textdraw.
-   [PlayerTextDrawDestroy](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawDestroy): از بین بردن یک player textdraw.
-   [PlayerTextDrawIsBox](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawIsBox): بررسی اینکه آیا یک player textdraw جعبه هست یا نه.
-   [PlayerTextDrawColor](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawColor): تنظیم رنگ متن در یک player textdraw.
-   [PlayerTextDrawBoxColor](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawBoxColor): تنظیم رنگ جعبه یک player textdraw.
-   [PlayerTextDrawBackgroundColor](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawBackgroundColor): تنظیم رنگ پس‌زمینه یک player textdraw.
-   [PlayerTextDrawAlignment](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawAlignment): تنظیم تراز یک player textdraw.
-   [PlayerTextDrawFont](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawFont): تنظیم فونت یک player textdraw.
-   [PlayerTextDrawLetterSize](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawLetterSize): تنظیم اندازه حروف متن در یک player textdraw.
-   [PlayerTextDrawTextSize](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawTextSize): تنظیم اندازه جعبه player textdraw (یا منطقه قابل کلیک برای PlayerTextDrawSetSelectable).
-   [PlayerTextDrawSetOutline](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawSetOutline): فعال/غیرفعال کردن outline روی یک player textdraw.
-   [PlayerTextDrawSetShadow](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawSetShadow): تنظیم سایه روی یک player textdraw.
-   [PlayerTextDrawSetProportional](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawSetProportional): مقیاس کردن فاصله متن در یک player textdraw به نسبت متناسب.
-   [PlayerTextDrawSetString](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawSetString): تنظیم متن یک player textdraw.
-   [PlayerTextDrawShow](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawShow): نمایش یک player textdraw.
-   [PlayerTextDrawHide](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawHide): مخفی کردن یک player textdraw.
