m-Scripts
  • m-Scripts Documentation
  • QBCore
    • Jobs
      • 🚗[QB] TunerJob
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🍞[QB] BeanMachine
        • 🛠️Installation
        • 🗒️Config
      • 🍔[QB] Burgershot
        • 🛠️Installation
        • 🗒️Config
      • 🍈[QB] CoolBeans
        • 🛠️Installation
        • 🗒️Config
      • 🚚[QB] Deliveries
        • 🛠️Installation
        • 📃Config
          • 📃config_functions
      • 🍎[QB] Farming
        • 🛠️Installation
        • 🗒️Config
      • 🐟[QB] Fishing
        • 🛠️Installation
        • 🗒️Config
          • 📄config_diving
          • 📄config_fishingnet
          • 📄config_fishingrod
          • 📄config_functions
          • 📄config_language
          • 📄config_seashells
          • 📄config_tournament
          • 📄config_upgrades
      • 🚛[QB] Garbage
        • 🛠️Installation
        • 🗒️Config
      • 🗝️[QB] GoldRush
        • 🛠️Installation
        • 🗒️Config
      • ⛰️[QB] Hunting
        • 🛠️Installation
        • 🗒️Config
      • 🪵[QB] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[QB] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🛢️[QB] Oil Factory
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • ☕[QB] Pond Coffee
        • 🛠️Installation
        • ❓Common Questions
        • 🗒️Config
      • 🚚[QB] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🥃[QB] Vanilla
        • 🛠️Installation
        • 🗒️Config
      • 🛻[QB] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • 🥃[QB] Bahamas
        • 🛠️Installation
        • 📄Config
      • 🔫[QB] Ammunation
        • 🛠️Installation
        • 📄Config
      • 🐟[QB] Pearls
        • 🛠️Installation
        • 📄Config
      • 🔓[QB] Impound
        • 🛠️Installation
        • 📄Config
        • ✅Garages
      • 🚘[QB] Vehicleshop
        • 🛠️Installation
        • 📄Config
          • Functions
          • Job
          • Language
        • ❓Common Questions
    • General
      • 🏕️[QB] Camping
        • 🛠️Installation
        • 🗒️Config
          • Consumables
          • Language
      • 🎄[QB] Christmas
        • 🛠️Installation
        • 🗒️Config
      • 🎃[QB] Halloween
        • 🛠️Installation
        • 🗒️Config
      • 📔[QB] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 🗒️Config
        • 🔁Server-Exports
      • 🏘️[QB] Vespucci
        • 🛠️Installation
        • 🗒️Config
          • Brewery
          • Digital Den
          • Masquerade
          • Pro Bikes
      • 🏖️[QB] Beach Activities
        • 🛠️Installation
        • 🗒️Config
      • 🚘[QB] Car Rental
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • ✈️[QB] Sky Racing
        • 🛠️Installation
        • 📄Config
      • 🚘[QB] Car Wash
        • 🛠️Installation
        • 📄Config
      • 🪨[QB] Grinder
        • 🛠️Installation
        • 📄Config
      • 📹[QB] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
      • 🏠[QB] Motel
        • 🛠️Installation
        • 📄Config
        • 🖥️Compatibilities
      • 🏚️[QB] Job Center
        • 📄Config
      • 🛠️[QB] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
    • Illegal
      • 🔫[QB] Gangs
        • 🛠️Installation
        • 🗒️Config
      • 🔔[QB] Drug Selling
        • 🗒️Config
      • 🌱[QB] Drugs
        • 🛠️Installation
        • 🗒️Config
      • 🍯[QB] Craft Potion
        • 🛠️Installation
        • 🗒️Config
      • 🅱️[QB] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🚗[QB] Car Thief
        • 🗒️Config
      • 🏠[QB] House Robbery
        • 🛠️Installation
        • 🗒️Config
      • 💎[QB] Jewelry
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ®️[QB] Mini Robberys
        • 🛠️Installation
        • 🗒️Config
      • 💰[QB] MoneyWash
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🔫[QB] Rob NPC
        • 🛠️Installation
        • 🗒️Config
      • 🏃‍♂️[QB] Runs
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • ⛽[QB] Steal Fuel
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🏬[QB] Store Robbery
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 🪛[QB] Scrapyard
        • 🛠️Installation
        • 🗒️Config
          • Functions
          • Language
      • 👾[QB] Territories
        • 🛠️Installation
        • 📄Config
          • Functions
      • 🏨[QB] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • ESX
    • Jobs
      • 🚗[ESX] Tunerjob
        • ❗Dependencies
        • 🛠️Installation
          • ℹ️OX-Inventory
          • ℹ️QS-Inventory
        • 🗒️Config
          • BlacklistVehicles
          • Craft
          • Functions
          • Language
          • Targets
          • Wraps
          • Events
        • ❓Common Questions
      • 🚚[ESX] Trucker
        • 🛠️Installation
        • 🗒️Config
          • 📄Functions
          • 📄Language
      • 🪵[ESX] Lumberjack
        • 🛠️Installation
        • 🗒️Config
      • 🛻[ESX] Mechanic Run
        • 🛠️Installation
        • 🗒️Config
      • ⛏️[ESX] Mining
        • 🛠️Installation
        • 🗒️Config
      • 🎣[ESX] Fishing
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • Diving
          • Fishingnet
          • Fishingrod
          • Seashells
          • Tournament
          • Upgrades
    • General
      • 🚘[ESX] Car Rental
        • 🛠️Installation
        • 🗒️Config
      • 📃[ESX] Insurance
        • 🛠️Installation
        • 🖥️Compatibilities
        • 📄Config
        • 🔁 Server-Exports
      • 🚘[ESX] Car Wash
        • 🛠️Installation
        • 📄Config
      • 📹[ESX] SpyCams & CCTV's
        • 🛠️Installation
        • 📄Config
        • 🏠[ESX] Motel
          • 🛠️Installation
          • 📄Config
          • 🖥️Compatibilities
      • 🛠️[ESX] Crafting
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🎄[ESX] Christmas
        • 🛠️Installation
        • 📄Configs
    • Illegal
      • 🔫[ESX] Gangs
        • 🛠️Installation
        • 📄Config
        • ❓Common Questions
      • 🅱️[ESX] Blackmarket
        • 🛠️Installation
        • 🗒️Config
          • config_functions
          • config_language
      • 🏨[ESX] GoPostal
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
          • S_utils
  • Both Framework
    • Scripts
      • 🚗Car Rebuild
        • 🛠️Installation
        • 🗒️Config
      • 🗺️City Guide
        • 🛠️Installation
        • 📄Config
          • Functions
          • Language
      • 🛒Shops
        • 📄Config
        • 🛠️Installation
      • 🔁Reputation
        • 📄Config
        • 🛠️Installation
        • ⁉️Exports & Commands
          • Server Exports
          • Commands
      • 💤AFK System
        • 📄Configs
        • 🛠️Installation
      • 🚗Garages
        • 🛠️Installation
        • 📑User Guide
          • Create Garages
          • Create Private Garage
          • Impound & Auctions
          • Add vehicle to gang/job
          • Commands
      • ✈️Airplane Job
        • 🛠️Installation
        • 📃Configs
        • ℹ️Exports
      • 📋Scoreboard
        • 📃Config
      • 📦StorageUnits
        • 🛠️Installation
        • 📃Config
Powered by GitBook
On this page
  • Items Installation
  • Metadata Installation
  • Emotes Menu Installation
  • Jobs Installation
  1. ESX
  2. General
  3. [ESX] Insurance

Installation

Items Installation

["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",
    }
}
["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"] = ""
}

Metadata Installation

} 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>"
    );
} else if (
    itemData.name == "car_insurance" ||
    itemData.name == "car_registration"
  ) {
    html = `
      <div class="item_info_container">
        <div class="item_info_row">
            <div class="item_info_row_left">Name:</div>
            <div class="item_info_row_right"> ${itemData.info.name}</div>
        </div>
        <div class="item_info_row">
            <div class="item_info_row_left">Plate: </div>
            <div class="item_info_row_right"> ${itemData.info.plate}</div>
        </div>
        <div class="item_info_row">
            <div class="item_info_row_left">Vehicle Model: </div>
            <div class="item_info_row_right"> ${itemData.info.model}</div>
        </div>
        <div class="item_info_row">
            <div class="item_info_row_left">Expires: </div>
            <div class="item_info_row_right"> ${itemData.info.expire}</div>
        </div>
      </div>
    `;
  } else if (
    itemData.name == "health_insurance" ||
    itemData.name == "home_insurance"
  ) {
    html = `
      <div class="item_info_container">
        <div class="item_info_row">
            <div class="item_info_row_left">Name:</div>
            <div class="item_info_row_right"> ${itemData.info.name}</div>
        </div>
        <div class="item_info_row">
            <div class="item_info_row_left">Expires: </div>
            <div class="item_info_row_right"> ${itemData.info.expire}</div>
        </div>
      </div>
    `;
  } else if (itemData.name == "car_camera") {
    html = `
      <div class="item_info_container">
        <div class="item_info_row">
            <div class="item_info_row_left">Plate:</div>
            <div class="item_info_row_right"> ${itemData.info.plate}</div>
        </div>
      
      </div>
    `;

Emotes Menu Installation

-- 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,
}},
-- 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,
}},
{
    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),
                },
            },
        },
    },
},

Jobs Installation

Run the follow 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
Previous[ESX] InsuranceNextCompatibilities

Last updated 1 month ago

📃
🛠️