---
title: "IsActorInvulnerable | open.mp"
description: "چک می‌کنه که آیا یه actor آسیب‌ناپذیره یا نه."
canonical: https://omp.itsneufox.com/fa/docs/scripting/functions/IsActorInvulnerable
language: fa
---

# IsActorInvulnerable

هشدار

This function was added in SA-MP 0.3.7 and will not work in earlier versions!

## توضیحات

چک می‌کنه که آیا یه actor آسیب‌ناپذیره یا نه.

| نام | توضیحات |
| --- | --- |
| actorid | ID actor ای که باید چک بشه. |

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

**true** - actor آسیب‌ناپذیره.

**false** - actor آسیب‌پذیره.

## مثال‌ها

```c
new gMyActor;

public OnGameModeInit()
{
    gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor as a salesperson in Ammunation.

    if (IsActorInvulnerable(gMyActor))
    {
        print("Actor is invulnerable.");
    }
    else
    {
        print("Actor is vulnerable.");
    }
    return 1;
}
```

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

-   [CreateActor](https://omp.itsneufox.com/fa/docs/scripting/functions/CreateActor): ساخت یه actor (NPC استاتیک).
-   [SetActorInvulnerable](https://omp.itsneufox.com/fa/docs/scripting/functions/SetActorInvulnerable): تنظیم آسیب‌ناپذیر بودن actor.
-   [SetActorHealth](https://omp.itsneufox.com/fa/docs/scripting/functions/SetActorHealth): تنظیم سلامتی یه actor.
