---
title: "PlayerTextDrawBackgroundColor | open.mp"
description: "تنظیم رنگ پس زمینه یک player-textdraw"
canonical: https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawBackgroundColor
language: fa
---

# PlayerTextDrawBackgroundColor

## توضیحات

رنگ پس زمینه یک player-textdraw رو تنظیم می‌کنه.

| نام | توضیحات |
| --- | --- |
| playerid | آی‌دی بازیکنی که player-textdraw متعلق بهش هست |
| PlayerText:textid | آی‌دی player-textdraw که می‌خوای رنگ پس زمینه‌ش رو تنظیم کنی |
| backgroundColour | رنگی که textdraw باهاش تنظیم می‌شه. |

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

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

## مثال‌ها

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

public OnPlayerConnect(playerid)
{
    gMyTextdraw[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Welcome to my OPEN.MP server");
    PlayerTextDrawUseBox(playerid, gMyTextdraw[playerid], true);
    PlayerTextDrawBackgroundColor(playerid, gMyTextdraw[playerid], 0xFFFFFFFF); // Range pas zamine gMyTextdraw ro sefid mikonim
    return 1;
}
```

## نکات

یادداشت

اگه از [PlayerTextDrawSetOutline](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawSetOutline) با اندازه > 0 استفاده کنی، رنگ outline با رنگی که در PlayerTextDrawBackgroundColour استفاده شده مطابقت می‌کنه. تغییر مقدار رنگ به نظر می‌رسه که رنگ استفاده شده در PlayerTextDrawColour رو تغییر می‌ده.

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

-   [CreatePlayerTextDraw](https://omp.itsneufox.com/fa/docs/scripting/functions/CreatePlayerTextDraw): ایجاد یک player-textdraw.
-   [PlayerTextDrawDestroy](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawDestroy): حذف یک 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.
-   [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 به نسبت متناسب.
-   [PlayerTextDrawUseBox](https://omp.itsneufox.com/fa/docs/scripting/functions/PlayerTextDrawUseBox): فعال/غیرفعال کردن جعبه روی یک 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.
