> ## 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.

# On entity spawn

> Se déclenche côté client quand une mission fait apparaître un ped, un véhicule ou un objet.

```lua Event theme={null}
RegisterNetEvent("missions_creator:entitySpawned", function(entityType, entity)

end)
```

### Paramètres

| Nom | Type de donnée | Description |
| - | - | - |
| `entityType` | string | `ped` / `vehicle` / `object` |
| `entity` | integer | Le handle de l'entité |

## Exemple

```lua theme={null}
-- Juste un exemple que tu peux modifier pour donner des clés aux véhicules générés
RegisterNetEvent("missions_creator:entitySpawned", function(entityType, entity)
    if(entityType == "vehicle") then
        local plate = GetVehicleNumberPlateText(entity)
        TriggerEvent("GIVEKEYS", plate)
    end
end)
```

<Note>
  Place ce code dans le fichier `jaksam_core/config/cl_config.lua`, en bas du fichier sur de nouvelles lignes.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.