> For the complete documentation index, see [llms.txt](https://mscripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mscripts.gitbook.io/docs/esx/general/esx-insurance/installation.md).

# Installation

## Items Installation

{% tabs %}
{% tab title="ox\_inventory/data/items.lua" %}

```lua
["car_insurance"] = {
    label = "Car Insurance",
    weight = 25,
    stack = false,
    close = true,
    description = "Document that proves you have insurance for your vehicle",
    client = {
        image = "car_insurance.png",
    }
},

["car_registration"] = {
    label = "Car Registration",
    weight = 25,
    stack = false,
    close = true,
    description = "Document that proves you are the owner of the vehicle",
    client = {
        image = "car_registration.png",
    }
},

["health_insurance"] = {
    label = "Health Insurance",
    weight = 25,
    stack = false,
    close = true,
    description = "Document that proves you have health insurance",
    client = {
        image = "health_insurance.png",
    }
},

["home_insurance"] = {
    label = "Home Insurance",
    weight = 25,
    stack = false,
    close = true,
    description = "Document that proves you have home insurance",
    client = {
        image = "home_insurance.png",
    }
},
["car_camera"] = {
    label = "Car Camera",
    weight = 25,
    stack = false,
    close = true,
    description = "Camera for your vehicle",
    client = {
	image = "car_camera.png",
    }
}
```

{% endtab %}

{% tab title="qs-inventory/shared/items.lua" %}

```lua
["car_insurance"] = {
    ["name"] = "car_insurance",
    ["label"] = "Car Insurance",
    ["weight"] = 150,
    ["type"] = "item",
    ["image"] = "car_insurance.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = ""
},

["car_registration"] = {
    ["name"] = "car_registration",
    ["label"] = "Car Registration",
    ["weight"] = 150,
    ["type"] = "item",
    ["image"] = "car_registration.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = ""
},

["health_insurance"] = {
    ["name"] = "health_insurance",
    ["label"] = "Health Insurance",
    ["weight"] = 150,
    ["type"] = "item",
    ["image"] = "health_insurance.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = ""
},

["home_insurance"] = {
    ["name"] = "home_insurance",
    ["label"] = "Home Insurance",
    ["weight"] = 150,
    ["type"] = "item",
    ["image"] = "home_insurance.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = ""
},

["car_camera"] = {
    ["name"] = "car_camera",
    ["label"] = "Car Camera",
    ["weight"] = 20,
    ["type"] = "item",
    ["image"] = "car_camera.png",
    ["unique"] = true,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = ""
}
```

{% endtab %}
{% endtabs %}

## Metadata Installation

{% tabs %}
{% tab title="qs-inventory/configs/config\_metadata.js" %}

```lua
} else if (itemData.name == "car_insurance") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Name: </strong><span>" +
        itemData.info.name +
        "</span></p><p><strong>Plate: </strong><span>" +
        itemData.info.plate +
        "</span></p><p><strong>Vehicle Model: </strong><span>" +
        itemData.info.model +
        "</span></p><p><strong>Expires: </strong><span>" +
        itemData.info.expire +
        "</span></p>"
    );

} else if (itemData.name == "car_registration") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Name: </strong><span>" +
        itemData.info.name +
        "</span></p><p><strong>Plate: </strong><span>" +
        itemData.info.plate +
        "</span></p><p><strong>Vehicle Model: </strong><span>" +
        itemData.info.model +
        "</span></p><p><strong>Expires: </strong><span>" +
        itemData.info.expire +
        "</span></p>"
    );

} else if (itemData.name == "health_insurance") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Name: </strong><span>" +
        itemData.info.name +
        "</span></p><p><strong>Expires: </strong><span>" +
        itemData.info.expire +
        "</span></p>"
    );
} else if (itemData.name == "home_insurance") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Name: </strong><span>" +
        itemData.info.name +
        "</span></p><p><strong>Expires: </strong><span>" +
        itemData.info.expire +
        "</span></p>"
    );
} else if (itemData.name == "car_camera") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "</span></p><p><strong>Plate: </strong><span>" +
        itemData.info.plate +
        "</span></p>"
    );
```

{% endtab %}

{% tab title="tgiann-inventory/metadata.js" %}

```lua
    car_insurance = {
        {
            metadata = "name",
            value = {
                tr = "İsim:",
                en = "Nome:"
            }
        },
        {
            metadata = "plate",
            value = {
                tr = "Plaka:",
                en = "Matrícula:"
            }
        },
        {
            metadata = "model",
            value = {
                tr = "Araç Modeli:",
                en = "Modelo do Veículo:"
            }
        },
        {
            metadata = "expire",
            value = {
                tr = "Bitiş:",
                en = "Expira:"
            }
        },
    },
    
    car_registration = {
        {
            metadata = "name",
            value = {
                tr = "İsim:",
                en = "Nome:"
            }
        },
        {
            metadata = "plate",
            value = {
                tr = "Plaka:",
                en = "Matrícula:"
            }
        },
        {
            metadata = "model",
            value = {
                tr = "Araç Modeli:",
                en = "Modelo do Veículo:"
            }
        },
        {
            metadata = "expire",
            value = {
                tr = "Bitiş:",
                en = "Expira:"
            }
        },
    },
    
    health_insurance = {
        {
            metadata = "name",
            value = {
                tr = "İsim:",
                en = "Nome:"
            }
        },
        {
            metadata = "expire",
            value = {
                tr = "Bitiş:",
                en = "Expira:"
            }
        },
    },
    
    home_insurance = {
        {
            metadata = "name",
            value = {
                tr = "İsim:",
                en = "Nome:"
            }
        },
        {
            metadata = "expire",
            value = {
                tr = "Bitiş:",
                en = "Expira:"
            }
        },
    },
    
    car_camera = {
        {
            metadata = "plate",
            value = {
                tr = "Plaka:",
                en = "Matrícula:"
            }
        },
    },
```

{% endtab %}
{% endtabs %}

## Emotes Menu Installation <a href="#emotes-menu-installation" id="emotes-menu-installation"></a>

{% tabs %}
{% tab title="rpemotes/Client/AnimationList.lua" %}

```lua
-- This code below is inside the RP.Emotes = {
["health_insurance"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_health",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
["car_insurance"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_vehicle",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
["car_registration"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_registration",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
["home_insurance"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_house",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
```

{% endtab %}

{% tab title="dpemotes/Client/AnimationList.lua" %}

```lua
-- This code below is inside the DP.Emotes = {
["health_insurance"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_health",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
["car_insurance"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_vehicle",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
["car_registration"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_registration",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
["home_insurance"] = {"anim@heists@humane_labs@finale@keycards", "ped_a_enter_loop", "Card", AnimationOptions =
{
    Prop = "m-insurance_prop_card_house",
    PropBone = 18905,
    PropPlacement = {0.17, 0.03, 0.04, 1.0, 184.0, 0.0},
    EmoteLoop = true,
    EmoteMoving = true,
}},
```

{% endtab %}

{% tab title="scully\_emotemenu/data/animations/prop\_emotes.lua" %}

```lua
{
    Label = 'Health Insurance',
    Command = 'health_insurance',
    Animation = 'ped_a_enter_loop',
    Dictionary = 'anim@heists@humane_labs@finale@keycards',
    Options = {
        Props = {
            {
                Bone = 18905,
                Name = 'm-insurance_prop_card_health',
                Placement = {
                    vector3(0.17, 0.03, 0.04),
                    vector3(1.0, 184.0, 0.0),
                },
            },
        },
    },
},
{
    Label = 'Car Insurance',
    Command = 'car_insurance',
    Animation = 'ped_a_enter_loop',
    Dictionary = 'anim@heists@humane_labs@finale@keycards',
    Options = {
        Props = {
            {
                Bone = 18905,
                Name = 'm-insurance_prop_card_vehicle',
                Placement = {
                    vector3(0.17, 0.03, 0.04),
                    vector3(1.0, 184.0, 0.0),
                },
            },
        },
    },
},
{
    Label = 'Car Registration',
    Command = 'car_registration',
    Animation = 'ped_a_enter_loop',
    Dictionary = 'anim@heists@humane_labs@finale@keycards',
    Options = {
        Props = {
            {
                Bone = 18905,
                Name = 'm-insurance_prop_card_registration',
                Placement = {
                    vector3(0.17, 0.03, 0.04),
                    vector3(1.0, 184.0, 0.0),
                },
            },
        },
    },
},
{
    Label = 'Home Registration',
    Command = 'home_insurance',
    Animation = 'ped_a_enter_loop',
    Dictionary = 'anim@heists@humane_labs@finale@keycards',
    Options = {
        Props = {
            {
                Bone = 18905,
                Name = 'm-insurance_prop_card_house',
                Placement = {
                    vector3(0.17, 0.03, 0.04),
                    vector3(1.0, 184.0, 0.0),
                },
            },
        },
    },
},
```

{% endtab %}
{% endtabs %}

## Jobs Installation

Run the follow SQL:

```sql
INSERT INTO `jobs` (`name`, `label`, `whitelisted`) 
SELECT 'insurance', 'Insurance', 1 
WHERE NOT EXISTS (SELECT 1 FROM `jobs` WHERE `name` = 'insurance');

INSERT INTO `jobs` (`name`, `label`, `whitelisted`) 
SELECT 'home_insurance', 'Home Insurance', 1 
WHERE NOT EXISTS (SELECT 1 FROM `jobs` WHERE `name` = 'home_insurance');

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) 
SELECT 'insurance', 0, 'employee', 'Insurance', 500, '{}', '{}' 
WHERE NOT EXISTS (SELECT 1 FROM `job_grades` WHERE `job_name` = 'insurance' AND `grade` = 0);

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) 
SELECT 'home_insurance', 0, 'employee', 'Home Insurance', 500, '{}', '{}' 
WHERE NOT EXISTS (SELECT 1 FROM `job_grades` WHERE `job_name` = 'home_insurance' AND `grade` = 0
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://mscripts.gitbook.io/docs/esx/general/esx-insurance/installation.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.
