37 lines
1.2 KiB
Lua
37 lines
1.2 KiB
Lua
--[[
|
|
rv-target — Red Valley qb-target Override
|
|
Patches qb-target CSS at server start (before players connect)
|
|
Keeps qb-target 100% stock — safe to update without losing customizations
|
|
]]
|
|
|
|
local PATCHES = {
|
|
{
|
|
source = 'patches/style.css',
|
|
target = 'resources/[framework]/[core]/qb-target/html/css/style.css',
|
|
},
|
|
}
|
|
|
|
AddEventHandler('onResourceStart', function(resourceName)
|
|
if GetCurrentResourceName() ~= resourceName then return end
|
|
|
|
print('^2[rv-target]^0 Applying visual patches to qb-target...')
|
|
|
|
for _, patch in ipairs(PATCHES) do
|
|
local content = LoadResourceFile(GetCurrentResourceName(), patch.source)
|
|
if content then
|
|
local file = io.open(patch.target, 'w')
|
|
if file then
|
|
file:write(content)
|
|
file:close()
|
|
print('^2[rv-target]^0 ✓ Patched: ' .. patch.target)
|
|
else
|
|
print('^1[rv-target]^0 ✗ Failed to write: ' .. patch.target)
|
|
end
|
|
else
|
|
print('^1[rv-target]^0 ✗ Patch file not found: ' .. patch.source)
|
|
end
|
|
end
|
|
|
|
print('^2[rv-target]^0 Done. qb-target visuals overridden.')
|
|
end)
|