> For the complete documentation index, see [llms.txt](https://5scripts-1.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://5scripts-1.gitbook.io/docs/assets/5s_hitmarker/exports.md).

# Exports

## Exports

> **Note:** This documentation describes the exported functions that can be called from other resources. These functions provide external access to the 5s\_hitmarker system functionality.

***

### Client Side Exports

#### 1. `renderHitMarkerForPed`

* **renderHitMarkerForPed(ped, damage, armourLeft, wasKilled, isHeadshot)**
  * Manually triggers a hit marker above a ped, using the configured styling and sounds.
  * **Arguments:**
    * `ped` *(number)*: Entity handle of the target ped.
    * `damage` *(number)*: Damage amount to display on the marker.
    * `armourLeft` *(number)*: Remaining armor of the target (used to pick the marker style).
    * `wasKilled` *(boolean)*: Whether this hit killed the target.
    * `isHeadshot` *(boolean)*: Whether the hit was a headshot.
  * **Returns:** None (void function).
  * **Usage:** Lets custom damage/combat systems (e.g. training ranges) draw markers without relying on the built-in damage detection.
  * **Example:**

    ```lua
    -- Draw a 50-damage headshot marker above a target ped
    exports['5s_hitmarker']:renderHitMarkerForPed(targetPed, 50, 0, false, true)
    ```

***

#### 2. `setFontType`

* **setFontType(type)**
  * Overrides the marker font at runtime.
  * **Arguments:**
    * `type` *(number)*: Font type to use (`0`-`7`, `4` is recommended).
  * **Returns:** None (void function).
  * **Usage:** Change the marker font on the fly without editing `config.lua`.
  * **Example:**

    ```lua
    exports['5s_hitmarker']:setFontType(4)
    ```

***

> Use these exports to integrate the 5s\_hitmarker system with your own resources.
