# Lz-Gizmo

## Dependencies&#x20;

<details>

<summary>OX_Lib</summary>

**You will need the latest version of** [**Ox\_lib**](https://github.com/overextended/ox_lib)**.**\
\
**-** Extract the contents of the archive to your resources folder.\
\- Start the resource near the top of your resources in your server.cfg.

ensure ox\_lib \
ensure Lz-Gizmo

</details>

## Client Exports :&#x20;

```lua
exports['Lz-Gizmo']:useGizmo(entity)
```

***

```lua
RegisterNetEvent('EventName', function(model)
    RequestModel(model)
    while not HasModelLoaded(model) do
        Wait(1000)
    end

    local ped = PlayerPedId()
    local offset = GetOffsetFromEntityInWorldCoords(ped, 0, 1.0, 0)

    local entity = CreateObject(GetHashKey(model), offset.x, offset.y, offset.z, true, false, false)
    local result = exports['Lz-Gizmo']:useGizmo(entity)
    local heading = GetEntityHeading(entity)
    SetEntityAsMissionEntity(entity, true, true)
    DeleteEntity(entity)


    local coords = vector4(result.position.x, result.position.y, result.position.z, heading)
    local rot    = vector3(result.rotation.x, result.rotation.y, result.rotation.z)
end)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lz-scripts.gitbook.io/lzdocs/getting-started/standalone/lz-gizmo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
