# Setting up the client side handlers and functions

```lua
AddEventHandler('fusti_vehicleshop:onEnter', function() -- called when the player is entered into the shop
    ExecuteCommand('hud')
    DisplayRadar(false)
    exports.ox_target:disableTargeting(true) -- optional
end)

AddEventHandler('fusti_vehicleshop:onExit', function() -- called when the player is exited from the shop
    ExecuteCommand('hud')
    DisplayRadar(true)
    exports.ox_target:disableTargeting(false) -- optional
end)

AddEventHandler('fusti_vehicleshop:onPurchase', function(data) -- called when the player successfully bought a vehicle
    local title = 'Information'
    local description = 'You have successfully purchased your vehicle for %s%s! (%s - %s)'
    lib.notify({
        title = title,
        description = description:format(data.price, data.currency, data.name, data.properties.plate),
        type = 'inform',
        position = 'top',
        icon = 'fas fa-car',
        time = 3000
    })
    -- ESX.ShowNotification(description:format(data.price, data.currency, data.vehicleName, data.plate), 'info', 3000)
    -- QBCore.Functions.Notify(description:format(data.price, data.currency, data.vehicleName, data.plate), 'info', 3000)
end)

Config.getVehicleProperties = function(entity) -- here you can use your framework's function as you like
    return lib.getVehicleProperties(entity) -- QBCore.Functions.GetVehicleProperties(entity) // ESX.Game.GetVehicleProperties(entity)
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://fuestis-document.gitbook.io/fusti-docs/fusti_vehicleshop/setting-up-the-config/setting-up-the-client-side-handlers-and-functions.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.
