---
title: "ClearBanList | open.mp"
description: "پاک کردن لیست ban."
canonical: https://omp.itsneufox.com/fa/docs/scripting/functions/ClearBanList
language: fa
---

# ClearBanList

هشدار

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

## توضیحات

پاک کردن لیست ban.

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

**true** - موفقیت.

**false** - اجرای تابع ناموفق بود.

## مثال‌ها

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/clearbanlist", true))
    {
        if (!IsPlayerAdmin(playerid))
        {
            return 1;
        }

        ClearBanList();
        SendClientMessage(playerid, -1, "[SERVER]: Ban list cleared.");
        return 1;
    }
    return 0;
}
```

## نکات

نکته

می‌توانید لیست ban را در فایل **bans.json** مشاهده کنید.

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

-   [BlockIpAddress](https://omp.itsneufox.com/fa/docs/scripting/functions/BlockIpAddress): بلاک کردن آدرس IP از اتصال به سرور برای مدت زمان مشخص.
-   [UnBlockIpAddress](https://omp.itsneufox.com/fa/docs/scripting/functions/UnBlockIpAddress): آنبلاک کردن IP که قبلاً بلاک شده بود.
-   [Ban](https://omp.itsneufox.com/fa/docs/scripting/functions/Ban): ban کردن بازیکن از بازی در سرور.
-   [BanEx](https://omp.itsneufox.com/fa/docs/scripting/functions/BanEx): ban کردن بازیکن با دلیل سفارشی.
-   [Kick](https://omp.itsneufox.com/fa/docs/scripting/functions/Kick): kick کردن بازیکن از سرور.
-   [IsBanned](https://omp.itsneufox.com/fa/docs/scripting/functions/IsBanned): بررسی اینکه آیا آدرس IP داده شده ban است.
