---
title: "AllowInteriorWeapons | open.mp"
description: "Toggle whether the usage of weapons in interiors is allowed or not."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/AllowInteriorWeapons
language: th
---

# AllowInteriorWeapons

## คำอธิบาย

Toggle whether the usage of weapons in interiors is allowed or not.

| Name | Description |
| --- | --- |
| allow | 1 to enable weapons in interiors (enabled by default), 0 to disable weapons in interiors. |

## ส่งคืน

This function does not return any specific values.

## ตัวอย่าง

```c
public OnGameModeInit()
{
    // This will allow weapons inside interiors.
    AllowInteriorWeapons(1);
    return 1;
}
```

## บันทึก

warning

This function does not work in the current SA:MP version!

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   [SetPlayerInterior](https://omp.itsneufox.com/th/docs/scripting/functions/SetPlayerInterior): Set a player's interior.
-   [GetPlayerInterior](https://omp.itsneufox.com/th/docs/scripting/functions/GetPlayerInterior): Get the current interior of a player.
-   [OnPlayerInteriorChange](https://omp.itsneufox.com/th/docs/scripting/callbacks/OnPlayerInteriorChange): Called when a player changes interior.
