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

# UWU Cat Café Job V2: Full Client and Server Exports

> Full client and server export reference for crux-uwucafejobv2 — integrate job, duty, grade, and XP data into any other FiveM resource.

UWU Cat Café Job V2 exposes exports on both the client and server so you can query job status, duty state, grade, and XP from any other resource on your server.

<Tabs>
  <Tab title="Client Exports">
    All client exports run in a client-side script context and operate on the local player.

    ***

    ### `hasJob()`

    Checks whether the local player currently holds the UWU café job.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:hasJob()
    ```

    **Returns**

    * `boolean` — `true` if the player has the job, `false` otherwise.

    **Example**

    ```lua theme={null}
    local hasJob = exports["crux-uwucafejobv2"]:hasJob()
    if hasJob then
        print("Player has a job")
    end
    ```

    ***

    ### `getJob()`

    Retrieves the full job details table for the local player.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:getJob()
    ```

    **Returns**

    * `table` — The job data table if the player has the job.
    * `false` — If the player does not have the job.

    **Example**

    ```lua theme={null}
    local Job = exports["crux-uwucafejobv2"]:getJob()
    if Job then
        print(json.encode(Job))
    end
    ```

    ***

    ### `onDuty()`

    Checks whether the local player is currently clocked on duty.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:onDuty()
    ```

    **Returns**

    * `boolean` — `true` if the player is on duty, `false` otherwise.

    **Example**

    ```lua theme={null}
    local onDuty = exports["crux-uwucafejobv2"]:onDuty()
    if onDuty then
        print("Player is on duty")
    end
    ```

    ***

    ### `hasJobAndGrade(grade)`

    Checks whether the local player has the job **and** holds at least the specified grade level.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:hasJobAndGrade(grade)
    ```

    **Parameters**

    | Parameter | Type     | Description                           |
    | --------- | -------- | ------------------------------------- |
    | `grade`   | `number` | The job grade level to check against. |

    **Returns**

    * `boolean` — `true` if the player has the job and the specified grade, `false` otherwise.

    **Example**

    ```lua theme={null}
    local hasJobAndGrade = exports["crux-uwucafejobv2"]:hasJobAndGrade(grade)  -- Replace grade with desired grade level
    if hasJobAndGrade then
        print("Player has the job and grade 5")
    end
    ```

    ***

    ### `insideZone()`

    Checks whether the local player is currently inside a configured script zone (e.g. the café premises).

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:insideZone()
    ```

    **Returns**

    * `boolean` — `true` if the player is inside a zone, `false` otherwise.

    **Example**

    ```lua theme={null}
    local inside = exports["crux-uwucafejobv2"]:insideZone()
    if inside then
        print("Player is inside a zone")
    end
    ```
  </Tab>

  <Tab title="Server Exports">
    All server exports run in a server-side script context and require a player server ID (`source`) as the first parameter.

    ***

    ### `hasJob(source)`

    Checks whether a player currently holds the UWU café job.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:hasJob(source)
    ```

    **Parameters**

    | Parameter | Type     | Description             |
    | --------- | -------- | ----------------------- |
    | `source`  | `number` | The player's server ID. |

    **Returns**

    * `boolean` — `true` if the player has the job, `false` otherwise.

    **Example**

    ```lua theme={null}
    local hasJob = exports["crux-uwucafejobv2"]:hasJob(source)
    if hasJob then
        print("Player has a job")
    end
    ```

    ***

    ### `getJob(source)`

    Retrieves the full job details table for a player.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:getJob(source)
    ```

    **Parameters**

    | Parameter | Type     | Description             |
    | --------- | -------- | ----------------------- |
    | `source`  | `number` | The player's server ID. |

    **Returns**

    * `table` — The job data table if the player has the job.
    * `false` — If the player does not have the job.

    **Example**

    ```lua theme={null}
    local Job = exports["crux-uwucafejobv2"]:getJob(source)
    if Job then
        print(json.encode(Job))
    end
    ```

    ***

    ### `onDuty(source)`

    Checks whether a player is currently clocked on duty.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:onDuty(source)
    ```

    **Parameters**

    | Parameter | Type     | Description             |
    | --------- | -------- | ----------------------- |
    | `source`  | `number` | The player's server ID. |

    **Returns**

    * `boolean` — `true` if the player is on duty, `false` otherwise.

    **Example**

    ```lua theme={null}
    local onDuty = exports["crux-uwucafejobv2"]:onDuty(source)
    if onDuty then
        print("Player is on duty")
    end
    ```

    ***

    ### `hasJobAndGrade(source, grade)`

    Checks whether a player has the job **and** holds at least the specified grade level.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:hasJobAndGrade(source, grade)
    ```

    **Parameters**

    | Parameter | Type     | Description                           |
    | --------- | -------- | ------------------------------------- |
    | `source`  | `number` | The player's server ID.               |
    | `grade`   | `number` | The job grade level to check against. |

    **Returns**

    * `boolean` — `true` if the player has the job and the specified grade, `false` otherwise.

    **Example**

    ```lua theme={null}
    local hasJobAndGrade = exports["crux-uwucafejobv2"]:hasJobAndGrade(source, grade)  -- Replace grade with desired grade level
    if hasJobAndGrade then
        print("Player has the job and grade 5")
    end
    ```

    ***

    ### `getPlayerExperience(source)`

    Retrieves the current XP total for a player.

    **Signature**

    ```lua theme={null}
    exports["crux-uwucafejobv2"]:getPlayerExperience(source)
    ```

    **Parameters**

    | Parameter | Type     | Description             |
    | --------- | -------- | ----------------------- |
    | `source`  | `number` | The player's server ID. |

    **Returns**

    * `number` — The player's current XP value if available.
    * `nil` — If XP data is unavailable for this player.

    **Example**

    ```lua theme={null}
    local xp = exports["crux-uwucafejobv2"]:getPlayerExperience(source)
    if xp then
        print("Player XP: " .. tostring(xp))
    end
    ```
  </Tab>
</Tabs>
