---
title: "NPC_IsReloadEnabled | open.mp"
description: "Verifica se o recarregamento automático está habilitado para um NPC."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/functions/NPC_IsReloadEnabled
language: pt-BR
---

# NPC\_IsReloadEnabled

aviso

Esta função foi adicionada no omp v1.5.8.3079 e não funcionará em versões anteriores!

## Descrição

Verifica se o recarregamento automático está habilitado para um NPC.

| Nome | Descrição |
| --- | --- |
| npcid | O ID do NPC |

## Retornos

Retorna `true` se o recarregamento automático estiver habilitado, caso contrário, `false`.

## Exemplos

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/checkreloadenabled", true))
    {
        new npcid = PlayerNPC[playerid];
        if (npcid == INVALID_NPC_ID)
            return SendClientMessage(playerid, 0xFF0000FF, "You are not debugging a NPC.");

        if (!NPC_IsValid(npcid))
            return SendClientMessage(playerid, 0xFF0000FF, "Invalid NPC.");

        new bool:isReloadEnabled = NPC_IsReloadEnabled(npcid);

        SendClientMessage(playerid, 0x00FF00FF, "NPC %d reload enabled: %s", npcid, isReloadEnabled ? "Yes" : "No");
        return 1;
    }
    return 0;
}
```

## Notas

-   O recarregamento automático faz com que o NPCs seja recarregado automaticamente quando o clipe estiver vazio
-   NPCs sem recarga automática irá parar de gravar quando o clipe acabar
-   Isso afeta apenas a munição do pente, não a munição total
-   Use `NPC_EnableReloading` para alterar a configuração de recarga

## Funções Relacionadas

-   [NPC\_EnableReloading](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/NPC_EnableReloading): Ativar/desativar recarga automática
-   [NPC\_IsReloading](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/NPC_IsReloading): Verifique se está recarregando no momento
-   [NPC\_GetAmmoInClip](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/NPC_GetAmmoInClip): Obtenha munição de clipe
-   [NPC\_SetAmmoInClip](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/NPC_SetAmmoInClip): Definir munição de clipe

## Callbacks Relacionadas

-   [OnNPCWeaponShot](https://omp.itsneufox.com/pt-BR/docs/scripting/callbacks/OnNPCWeaponShot): Chamado quando NPC é acionado
