QBESX
Agency-Repairkits Configuration
Système de kit de réparation de véhicules avec niveaux de dommages progressifs, bégaiement du moteur, états de panne.
v1.0.0Payant4 Pages

01Configuration
Installation rapide · config.lua · Agency-Repairkits
Config = {}
Config.Locale = 'en' -- Available: 'en', 'de'
Config.Framework = 'auto' -- 'qb', 'esx', 'standalone', or 'auto'
Config.Notifications = {
useAgencyNotify = true, -- Use Agency-Notify when available
agencyNotifyDuration = 8000 -- Duration for Agency-Notify notifications
}
Config.RepairKit = {
itemName = 'agencyrepairkit', -- Item name in database/inventory
usageTime = 10000, -- Time in milliseconds for repair process
removeOnUse = true, -- Remove item after successful repair
requiresEngine = false, -- Require engine to be off during repair
showProgressUI = true, -- Show progress UI during repair
maxDistance = 5.0 -- Maximum distance to vehicle for repair
}
Config.Commands = {
enableAdminCommand = true, -- Enable /agencygiverepairkit admin command
enableDebugCommands = false -- Enable debug commands for testing
}
Config.VehicleDamage = {
enabled = true, -- Enable collision damage system
damageMultiplier = 2.5, -- Damage multiplier for collisions
engineDamageThreshold = 900.0, -- Engine damage threshold
engineFailureThreshold = 700.0, -- Engine failure threshold
bodyDamageThreshold = 850.0, -- Body damage threshold
maxDamageNotifications = 2, -- Max notifications before engine lock
notificationCooldown = 5000, -- Cooldown between damage notifications (5 seconds)
stallNotificationCooldown = 3000, -- Cooldown between stall notifications (3 seconds)
-- Engine stalling chances by damage level
stallChance = {
light = 10, -- 10% chance for light damage
medium = 25, -- 25% chance for medium damage
heavy = 50, -- 50% chance for heavy damage
critical = 90 -- 90% chance for critical damage
},
-- Performance degradation when damaged
performanceLoss = {
acceleration = 0.5, -- 50% less acceleration
topSpeed = 0.4, -- 40% less top speed
braking = 0.3 -- 30% worse braking
}
}
02Fichier SQL
Importez ce fichier SQL dans votre base de données avant de démarrer la ressource :
-- Repair Kit System Database Schema
-- Compatible with both QB-Core and ESX frameworks
-- Table for tracking vehicle damage states (optional)
CREATE TABLE IF NOT EXISTS `vehicle_damage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plate` varchar(20) NOT NULL,
`engine_health` float DEFAULT 1000.0,
`body_health` float DEFAULT 1000.0,
`last_updated` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`owner` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `plate` (`plate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Table for repair kit usage logs (optional)
CREATE TABLE IF NOT EXISTS `repairkit_logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`player_id` varchar(50) NOT NULL,
`player_name` varchar(100) NOT NULL,
`vehicle_plate` varchar(20) NOT NULL,
`vehicle_model` varchar(50) DEFAULT NULL,
`engine_health_before` float DEFAULT NULL,
`body_health_before` float DEFAULT NULL,
`repair_time` timestamp DEFAULT CURRENT_TIMESTAMP,
`location` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `player_id` (`player_id`),
KEY `repair_time` (`repair_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Insert repair kit item for QB-Core (if using qb-core items table)
-- INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`)
-- VALUES ('repairkit', 'Fahrzeug Reparaturkit', 500, 0, 1);
-- Insert repair kit item for ESX (if using esx items table)
-- INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`)
-- VALUES ('repairkit', 'Fahrzeug Reparaturkit', 5, 0, 1);