> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Replace default police alert

> Replace the client-side police alert behavior with your own.

<Warning>
  Triggered when police is alerted. This is triggered on **each** police player's client — if you're looking for a single event, check the server-side category.
</Warning>

```lua Event theme={null}
RegisterNetEvent("farming_creator:alertedPolice", function(coords, message)

end)
```

### Parameters

| Name      | Data Type | Description                               |
| --------- | --------- | ----------------------------------------- |
| `coords`  | vector3   | Coordinates where the alert was triggered |
| `message` | string    | The message the cop would see             |

## Example

```lua theme={null}
-- Disables the default police alert
RegisterNetEvent("farming_creator:framework:ready", function()
    exports["farming_creator"]:disableScriptEvent("farming_creator:alertedPolice")
end)

RegisterNetEvent("farming_creator:alertedPolice", function(coords, message)
    -- Do something
end)
```

<Note>
  Place this code in the file `integrations/cl_integrations.lua` of the script, at the bottom of the file on new lines.
</Note>


## Related topics

- [Replace default police alert](/missions-creator/client/replace-default-police-alert.md)
