> For the complete documentation index, see [llms.txt](https://refresh-cx.gitbook.io/refresh.cx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://refresh-cx.gitbook.io/refresh.cx-docs/scripting/hook-native-for-resource.md).

# Hook Native For Resource

Same as Hook Native, but the hook only applies when the calling resource matches. Anything else calls the original.

## **Syntax**

```lua
refresh.Scripting.HookNativeForResource(hashOrName, valueOrFn, resourceName) -> Boolean
```

## **Return**

{% hint style="success" %}
Boolean (success)
{% endhint %}

## Usage Example

```lua
refresh.Scripting.HookNativeForResource("GetPlayerName", "refresh.cx", "anticheat")
```
