structura foldere

mutat kq- folders in un singur folder [kq]
This commit is contained in:
2026-03-30 01:55:03 +03:00
parent af1286d583
commit c291b81f26
2319 changed files with 0 additions and 14 deletions

View File

@@ -0,0 +1,56 @@
-- Wheel indexes:
-- 0 = Front left
-- 1 = Front right
-- 2 = Rear left
-- 3 = Rear right
-- Damages a specific wheel (wheels have max 1000.0 hp)
RegisterNetEvent('kq_wheeldamage:damageWheel')
AddEventHandler('kq_wheeldamage:damageWheel', function(veh, wheel, damage)
ApplyWheelDamage(veh, wheel, damage, indexToBone[wheel])
end)
-- Removes the wheel without dropping it
RegisterNetEvent('kq_wheeldamage:removeWheel')
AddEventHandler('kq_wheeldamage:removeWheel', function(veh, wheel)
SetVehicleWheelHealth(veh, wheel, 0.0)
TriggerServerEvent('kq_wheeldamage:setState', NetworkGetNetworkIdFromEntity(veh), true)
TriggerServerEvent('kq_wheeldamage:setBroken', NetworkGetNetworkIdFromEntity(veh), wheel, true)
end)
-- Fully repairs/reattaches a wheel
RegisterNetEvent('kq_wheeldamage:fixWheel')
AddEventHandler('kq_wheeldamage:fixWheel', function(veh, wheel)
SetVehicleTyreFixed(veh, wheel)
SetVehicleWheelHealth(veh, wheel, 1000.0)
TriggerServerEvent('kq_wheeldamage:setBroken', NetworkGetNetworkIdFromEntity(veh), wheel, false)
end)
-- Fully repairs all wheels of a vehicle
RegisterNetEvent('kq_wheeldamage:fixCar')
AddEventHandler('kq_wheeldamage:fixCar', function(veh)
for wheel, bone in pairs(indexToBone) do
if wheel <= GetVehicleNumberOfWheels(veh) -1 then
SetVehicleTyreFixed(veh, wheel)
SetVehicleWheelHealth(veh, wheel, 1000.0)
TriggerServerEvent('kq_wheeldamage:setBroken', NetworkGetNetworkIdFromEntity(veh), wheel, false)
end
end
end)
function IsBlacklisted(veh)
if Contains(Config.blacklist.classes, GetVehicleClass(veh)) then
return true
end
for k, model in pairs(Config.blacklist.models) do
if GetEntityModel(veh) == GetHashKey(model) then
return true
end
end
return false
end

View File

@@ -0,0 +1,184 @@
Config = {}
Config.debug = false
-- Precise wheel rendering (This can fix the issue with broken wheels flashing in and out) If it doesn't happen on your server
-- I wouldn't recommend enabling this as it will slightly increase the script resource usage (resmon)
Config.increaseWheelRenderTiming = false
-- Alternative method of the wheel breaking. This will make the actual model of the wheel fall off (same rim, tire etc.)
-- Although it does look better it isn't properly synced (not possible at this moment)
-- That's why it's disabled by default. Enable it if you don't care about the loose wheel prop not being synced and want it
-- to look better for the driver
Config.alternativeWheelBreak = false
-- The amount of damage the wheels will take on collisions (10-30 seems reasonable to me, for more realistic experience I'd recommend values between 50-100)
Config.collisionDamageAmount = 20
-- If you define a model specific multiplier it will be used instead of the class multiplier
-- Vehicle classes https://docs.fivem.net/natives/?_0x29439776AAA00A62
Config.collisionDamageMultiplier = {
models = {
kuruma2 = 0.5
},
classes = {
[0] = 1.2, -- Compacts
[1] = 1, -- Sedans
[2] = 0.8, -- SUVs
[3] = 1, -- Coupes
[4] = 1, -- Muscle
[5] = 1.25, -- Sports Classics
[6] = 1.2, -- Sports
[7] = 1.2, -- Super
[8] = 1.1, -- Motorcycles
[9] = 0.5, -- Off-road
[10] = 0.5, -- Industrial
[11] = 0.5, -- Utility
[12] = 1, -- Vans
[13] = 0.5, -- Cycles
[14] = 0, -- Boats
[15] = 0, -- Helicopters
[16] = 0, -- Planes
[17] = 0.9, -- Service
[18] = 0.7, -- Emergency
[19] = 0.5, -- Military
[20] = 0.5, -- Commercial
[21] = 0, -- Trains
}
}
-- The amount of damage the wheels will take on falls (10-30 seems reasonable to me, for more realistic experience I'd recommend values between 50-100)
Config.fallDamageAmount = 25
-- Multiplier for the fall damage for vehicles that are using off-road tires/wheels
Config.offroadTireFallDamageMultiplier = 0.7
-- Threshold of the fall speed required to deal wheel damage (3.8 by default. If you don't want smaller jumps to deal damage set it higher)
Config.fallThreshold = 3.8
-- Minimum fall airtime (in seconds) for the wheels to get damaged. This only counts for the duration the car was falling (going downwards)
Config.minimumAirTime = 0.5
-- If you define a model specific multiplier it will be used instead of the class multiplier
-- Vehicle classes https://docs.fivem.net/natives/?_0x29439776AAA00A62
Config.fallDamageMultiplier = {
models = {
bf400 = 0.4,
sanchez = 0.4,
sanchez2 = 0.4,
manchez = 0.4,
},
classes = {
[0] = 1, -- Compacts
[1] = 1, -- Sedans
[2] = 0.3, -- SUVs
[3] = 1, -- Coupes
[4] = 0.7, -- Muscle
[5] = 1.3, -- Sports Classics
[6] = 1.2, -- Sports
[7] = 1.5, -- Super
[8] = 0.6, -- Motorcycles
[9] = 0.3, -- Off-road
[10] = 0.7, -- Industrial
[11] = 0.7, -- Utility
[12] = 1.3, -- Vans
[13] = 0.6, -- Cycles
[14] = 0, -- Boats
[15] = 0, -- Helicopters
[16] = 0, -- Planes
[17] = 0.9, -- Service
[18] = 0.5, -- Emergency
[19] = 0.2, -- Military
[20] = 0.7, -- Commercial
[21] = 0, -- Trains
}
}
-- Chance of the wheel falling off when it reaches critical damage (0 - 100)
Config.fallOffChance = 35
-- Chance of the tire bursting when it reaches critical damage (0 - 100)
Config.tireBurstChance = 100
-- Whether or not to respect bulletproof tires for popping (wheels will still fall off)
Config.respectBulletproofTires = true
-- Makes the car undriveable when at least one wheel falls off
Config.setVehicleUndriveable = true
-- Some vehicles become really fast when a wheel falls off (blame Rockstar)
-- To prevent abuse you can limit the vehicle speed when the wheels fall off
Config.limitVehicleSpeed = true
-- Speed limit in kmh
Config.speedLimit = 40.0
-- There's a few decent wheel models to choose from https://gtahash.ru/?s=wheel
-- the 'prop_wheel_01' might fit more popular rims but the 'prop_tornado_wheel' has bouncy physics
Config.wheelModel = 'prop_wheel_01'
Config.wheelRim = 'prop_wheel_rim_03'
-- Vehicle classes https://docs.fivem.net/natives/?_0x29439776AAA00A62
Config.blacklist = {
models = {
'blazer',
'blazer2',
'blazer3',
'blazer4',
'blazer5',
'monster',
'monster3',
'monster4',
'monster5',
},
classes = {
14, 15, 16, 21
}
}
-- Fall damage based on the ground type the vehicle lands on
-- Surfaces which are counted as road (https://docs.fivem.net/natives/?_0xA7F04022)
Config.roadSurfaces = {
1, 3, 4, 12
}
-- If you define a model specific multiplier it will be used instead of the class multiplier
-- Multiplier that will be used for falls that land on dirt / non road(road like) material
Config.offroadFallDamageMultiplier = {
models = {
bf400 = 0.3,
sanchez = 0.3,
sanchez2 = 0.3,
manchez = 0.3,
buggy = 0.7,
},
classes = {
[0] = 1.0, -- Compacts
[1] = 1.0, -- Sedans
[2] = 0.9, -- SUVs
[3] = 1, -- Coupes
[4] = 0.9, -- Muscle
[5] = 1.3, -- Sports Classics
[6] = 1.3, -- Sports
[7] = 1.3, -- Super
[8] = 1.0, -- Motorcycles
[9] = 0.7, -- Off-road
[10] = 0.9, -- Industrial
[11] = 1, -- Utility
[12] = 1.2, -- Vans
[13] = 0.6, -- Cycles
[14] = 0, -- Boats
[15] = 0, -- Helicopters
[16] = 0, -- Planes
[17] = 0.9, -- Service
[18] = 0.5, -- Emergency
[19] = 0.2, -- Military
[20] = 0.7, -- Commercial
[21] = 0, -- Trains
}
}

View File

@@ -0,0 +1,34 @@
fx_version 'cerulean'
games { 'gta5' }
lua54 'yes'
author 'KuzQuality | Kuzkay'
description 'Realistic wheel damage by KuzQuality'
version '1.4.2'
--
-- Server
--
server_scripts {
'config.lua',
'server/server.lua',
}
--
-- Client
--
client_scripts {
'config.lua',
'client/client.lua',
'client/editable/editable.lua',
}
escrow_ignore {
'config.lua',
'client/editable/*.lua',
}
dependency '/assetpacks'