[FREE] Muhaddil Insurance Script
Overview
Muhaddil Insurance is a FiveM resource that adds a custom NPC, allowing players to purchase medical insurance in-game.
Features
- Custom NPC to facilitate insurance purchases.
- Compatibility with both ESX and QBCore frameworks for FiveM.
- Medical insurance options that can be customized.
- Insurance details are stored in a SQL database.
Requirements
- ESX Framework
OR
- QBCore Framework
- SQL Database: A properly configured SQL database to store player insurance data.
Installation
- Download the Muhaddil Insurance Script from the provided source. Download
- Unpack the files into your server’s
resources
folder.
- Configure your database: Import the provided SQL file to set up the necessary database tables for storing insurance data.
- Edit the configuration files to adjust any settings (such as NPC location, insurance types, and pricing).
- Add the script to your server’s
server.cfg
file, ensuring it starts correctly:ensure muhaddil_insurance
- Restart your server to apply the changes.
Compatibility
This script is compatible with both the ESX and QBCore frameworks. Ensure your server is using one of these frameworks before installation.
Support
If you encounter any issues or have suggestions for improvement, feel free to open an issue or contribute to the project. Issues
|
|
Code is accessible |
Yes |
Subscription-based |
No |
Lines (approximately) |
623 |
Requirements |
ESX/QBCore |
Support |
Yes |
4 Likes
how to sell insurance, and check other player insurance for ambulance job
To sell it you must go to the NPC or use the command “checkInsurance” with an allowed job to sell it an a discounted price.
For the second question, for the moment there isn’t any export, you must create a SQL call. I will do an export when I can.
Update 1.0.5
- Added new command for selling insurances (/sellinsurances).
- Added locals for better user experience.
- Added a new export for looking if a player has an active insurance:
exports['muhaddil_insurance']:hasValidInsurance()
or exports[‘muhaddil_insurance’]:hasValidInsurance(playerId)`. Both clientside and serverside.
Full Changelog: Comparing v1.0.4...v1.0.5 · Muhaddil/muhaddil_insurance · GitHub
Update 1.0.6
- Added support for qb-target and qtarget to ensure full compatibility with all targeting scripts.
Full Changelog: Comparing v1.0.5...v1.0.6 · Muhaddil/muhaddil_insurance · GitHub
Update 1.0.7
- Replaced old cleanExpiredInsurances logic to implement a ox_lib cron function.
- Added extra configs for the sell insurance command.
Full Changelog: Comparing v1.0.6...v1.0.7 · Muhaddil/muhaddil_insurance · GitHub
Update 1.0.9
- Refactor insurance check export to allow player-specific checks.
Full Changelog: Comparing v1.0.8...v1.0.9 · Muhaddil/muhaddil_insurance · GitHub
Update 1.0.10
- Enhance player name retrieval and add configuration option to toggle name display in insurance selection.
- Refactor version checking logic and enhance display of update information.
Full Changelog: Comparing v1.0.9...v1.0.10 · Muhaddil/muhaddil_insurance · GitHub
Update 1.0.11
- Changed WebHook configuration location for more security.
Full Changelog: Comparing v1.0.10...v1.0.11 · Muhaddil/muhaddil_insurance · GitHub