# Events & Exports

## Server Events <a href="#server-events" id="server-events"></a>

**rm\_decalv2:server:onDecalAdded**

```lua
AddEventHandler('rm_decalv2:server:onDecalAdded', function(data)
    if data.type == 'graffiti' then
        -- print(data.source)
        -- print(data.fileName)
        -- print(vec3(data.posX, data.posY, data.posZ))
    elseif data.type == 'sticker' then
        -- print(data.source)
        -- print(data.fileName)
        -- print(data.plate)
    end
end)
```

| Key      | Type   | Description                                                     |
| -------- | ------ | --------------------------------------------------------------- |
| source   | number | Source of the person who created the decal                      |
| fileName | string | File name of the decal                                          |
| posX     | number | X coordinates of the place of decal                             |
| posY     | number | Y coordinates of the place of decal                             |
| posZ     | number | Z coordinates of the place of decal                             |
| plate    | string | The number plate of the vehicle to which the sticker is affixed |

**rm\_decalv2:server:onDecalRemoved**

```lua
AddEventHandler('rm_decalv2:server:onDecalRemoved', function(data)
    if data.type == 'graffiti' then
        -- print(data.source)
        -- print(data.fileName)
        -- print(vec3(data.posX, data.posY, data.posZ))
    elseif data.type == 'sticker' then
        -- print(data.source)
        -- print(data.fileName)
        -- print(data.plate)
    end
end)
```

| Key      | Type   | Description                                                     |
| -------- | ------ | --------------------------------------------------------------- |
| source   | number | Source of the person who created the decal                      |
| fileName | string | File name of the decal                                          |
| posX     | number | X coordinates of the place of decal                             |
| posY     | number | Y coordinates of the place of decal                             |
| posZ     | number | Z coordinates of the place of decal                             |
| plate    | string | The number plate of the vehicle to which the sticker is affixed |
