# Script Car-Insurance

```lua
Config = {}

Config.Ped = {
    model = 's_m_m_dockwork_01', -- peds : https://wiki.rage.mp/index.php?title=Peds
    coords = vec4(123.5952, -1083.2338, 29.1925, 359.8058),
    scenario = 'WORLD_HUMAN_CLIPBOARD_FACILITY', -- scenarios / animations : https://gtaforums.com/topic/796181-list-of-scenarios-for-peds/
}

Config.Logs = {
    Label = 'Verpix Insurance Logs',
    PlayerSteam = 'Player Steam: **',
    Identifier = '**\nIdentifier: **',
    Source = '**\nServer ID: **',
    Plate = '**\nVehicle Plate: **',
    Days = '**\nDays: **',
    Price = '**\n Price: **',
    End = '€**',
    Webhook = 'YOUR_WEBHOOK',
    BotUsername = 'Verpix Logs'
}

Config.Config = {
    Command = true, -- true / false if true then command will be registered else not...
    CommandName = 'ins', -- command for checking insurance
    MustBeInVehicle = true, -- If they have to be in vehicle or out... If in then it will get current vehicle ped is in else it will get vehicle in radius = Config.Radius
    Radius = 5.0, -- radius from player to vehicle to be able to open and insure car!
    OkokNotify = false, -- true / false if true then it will be with okokNotify : https://okok.tebex.io/package/4724993
    Interaction = 'target' -- text = Ox_lib text ui, if 'target' then it will be on target..
}

Config.Blip = {
    Show = true, -- blips : https://docs.fivem.net/docs/game-references/blips/
    Sprite = 280,
    Scale = 0.8,
    Color = 29,
    Label = 'Car - Insurance'
}

Config.Text = {
    Distance = 4,
    Label = '[E] - Vehicle Insurance'
}

Config.Target = {
    IconTarget = 'fa-solid fa-clipboard', -- icons : https://fontawesome.com/icons
    LabelTarget = 'Insurance',
    Distance = 5
}

Config.Remove = {
    remove = false, -- true / false if true then it will remove 1 day for every day... so today is 30days tomorrow it will be 29 etc...
    Hour = 01, -- if up true then it will remove 1 day for all insurances in vehicle_insurance table at 10:30...
    Minute = 10, -- if up true then it will remove 1 day for all insurances in vehicle_insurance table at 10:30... 
} -- so hour and minute is at you daytime... if you put hour 20 and minute 30 then it will remove 20:30....

--[[
    label = 'what every you want...',
    price = 'what it cost for that option!',
    days = how much days it will be registred...
    money = 'type' 'money', 'bank', 'black_money'

]]

Config.Insurance = {
    values = {
        {label = 'Insurance 10 days', price = 5000, days = 10,  money = 'money'}, 
        {label = 'Insurance 20 days', price = 10000, days = 20, money = 'money'},
        {label = 'Insurance 50 days', price = 25000, days = 50, money = 'money'},
        {label = 'Insurance 100 days', price = 45000, days = 100, money = 'money'}
    }
}

Config.Notify = {

    NotInCarTitle = 'Not in a car!',
    NotInCarDesc = 'You have to be in car to acces',
    NotInCarType = 'error',

    TooFarTitle = 'Too far!',
    TooFarDesc = 'You are too far from position!',
    TooFarType = 'error',

    NotValidTitle = 'Not valid!',
    NotValidDesc = 'This car is not valid for insurance!',
    NotValidType = 'error',

    AlreadyInsuranceTitle = 'Already Insured',
    AlreadyInsuranceDesc = 'Car is already insured!',
    AlreadyInsuranceType = 'error',

    CarNotInsuredTitle = 'Not insured!',
    CarNotInsuredDesc = 'This car is not insured',
    CarNotInsuredType = 'error',

    CarInsuredTitle = 'Car insured',
    CarInsuredDesc = 'Your car has been insured!',
    CarInsuredType = 'success',

    MustBeOutsideTitle = 'Out of car',
    MustBeOutsideDesc = 'You have to be outside of the car!',
    MustBeOutsideType = 'error',

    VehicleTooFarTitle = 'Too far',
    VehicleTooFarDesc = 'Vehicle is too far away!',
    VehicleTooFarType = 'error',

    DontHaveMoney = 'You dont have enough money!'
}

```


---

# 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://verpix.gitbook.io/script-car.insurance/script-car-insurance.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.
