# Spawnar Veículos

O EQPG-Pro oferece um export para spawnar veículos de forma segura pelo **server-side**, evitando detecções do anticheat.

## Export

```lua
exports["eqpg-pro"]:setSpawnClient(source, mvehicle)
```

**Parâmetros:**

| Parâmetro  | Tipo          | Descrição                |
| ---------- | ------------- | ------------------------ |
| `source`   | `integer`     | ID do jogador            |
| `mvehicle` | `string/hash` | Model ou hash do veículo |

## Exemplo

```lua
-- Spawnar um Adder para o jogador
exports["eqpg-pro"]:setSpawnClient(source, "adder")

-- Spawnar usando hash
exports["eqpg-pro"]:setSpawnClient(source, GetHashKey("adder"))
```

## Integração com Garagem

Exemplo de como integrar com um script de garagem:

```lua
RegisterServerEvent("garagem:retirar")
AddEventHandler("garagem:retirar", function(veiculo)
    local source = source
    exports["eqpg-pro"]:setSpawnClient(source, veiculo)
end)
```

{% hint style="info" %}
Utilizar este export garante que o veículo spawnado não será detectado como spawn ilegal pelo anticheat.
{% endhint %}


---

# 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://eqpg-network.gitbook.io/eqpg-docs/guias-de-integracao/spawnar-veiculos.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.
