how please give me a example because i have been struggling with this
Hi Iâm just looking into this but how about doing wildcards as can be done with cars now?
Like:
server_scripts {
'**/server.lua',
}
client_scripts {
'**/client.lua'
}
That would be a lot cleaner, and less time spend.
Have a great Christmas!
Merging scripts (not vehicles and maps) can be done in two ways:
- you put all files in separated folder in one resource with including files in config.lua
- or you put all codes into one file, for example I merged most of the scripts about vehicles into one client.lua and one server.lua
well the solution number 1 is easy to do but not much effective on increasing fps
but number 2 can boost your cpu and memory usage specially when you reduce âwhile loopsâ or in other meaning merging âwhile loopsâ into each other, for example we have 2 loops from 2 different scripts :
while true do
print(âhelloâ)
Citizen.Wait(0)
end
while true do
print(âhello2â)
Citizen.Wait(0)
end
why not just merging them into :
while true do
print(âhello1â)
print(âhello2â)
Citizen.Wait(0)
end
we have another solution for specific resources like jobs, for example we have esx_pizzajob and esx_delivery job, both have same structure with different job names and a few other stuffs so we can merge them into one by editing and adding some code
hope I did help you
For those who still donât understand, I created 3 packs (Map_Pack, Car_Pack, Script_Pack). Everything you need to know is in the README.
Merge Scripts.zip (4.9 KB)
if you still need help i can help you
the car merger does not always work