First things first; THANK YOU, THANK YOU, THANK YOU!
You actually included all of the information required to help you. Ladies and gentlemen, we found someone with brains! hahaha. But seriously, thank you for actually structuring your support topic so well.
Anyway, please add the following to the __resource.lua file that you shared. The one that has “this_is_a_map” inside it.
files {
'stream/carrot.ytyp'
}
data_file 'DLC_ITYP_REQUEST' 'stream/carrot.ytyp'
That should fix your issue.
But please allow me to help you further. Here is some advice;
Stop using __resource.lua files and start using fxmanifest.lua files. They do the same thing, but have a different structure and the latter is the new way of doing things. So if you are creating new stuff, which you are, you shouldn’t be using outdated and deprecated ways of doing stuff. More information can be found here → Resource manifest - Cfx.re Docs
But basically, you can convert it easily. Change the name of the file from “__resource” to “fxmanifest” and replace the contents with the following;
fx_version 'cerulean'
games { 'gta5' }
this_is_a_map 'yes'
files {
'stream/carrot.ytyp'
}
data_file 'DLC_ITYP_REQUEST' 'stream/carrot.ytyp'
Also, with the script that you use to spawn, GetHashKey is a function that should be avoided when possible. It is used by everyone, everywhere. But it shouldn’t be. Instead of placing model names inside the GetHashKey function, simply encase them with backticks ( ` ), for a process known as Jenkins hashing. At run time, this will be read by the computer as the hask key, not the name. So in your example, you had the following;
local hash = GetHashKey("carrot")
This can become;
local hash = `carrot`
Because `carrot
` (with those backticks), is the same as GetHashKey(“carrot”). Now your scripts will be faster!