Build and install
Installing on your server
Put the files in a folder, add it to server.cfg, restart, and spawn the prop by its new name.
Install the resource
- 1
Make a folder
In your server's
resourcesdirectory, make a new folder named after the prop, for examplebarrier_blue. The zip has no folder of its own. - 2
Unzip into it
Unzip the download into that folder. It then holds
fxmanifest.luaand thestreamfolder directly:barrier_blue/ fxmanifest.lua stream/ barrier_blue.ydr barrier_blue.ytyp - 3
Add it to server.cfg
Add one line with the folder name:
ensure barrier_blue - 4
Restart the server
Restart the server and reconnect, so the game loads the new spawn names.
The manifest
The manifest in the zip is complete. You do not need to add anything:
fx_version 'cerulean'
game 'gta5'
description 'barrier_blue - Generated by SwisserAI'
files {
'stream/**/*.ydr',
'stream/**/*.ytyp',
}
data_file 'DLC_ITYP_REQUEST' 'stream/barrier_blue.ytyp'The data_file 'DLC_ITYP_REQUEST' line loads the .ytyp, which tells the game the spawn names. Without it the prop cannot be spawned.
Spawn the prop
Your prop now works like any other streamed prop, by its spawn name. Load the model, then create the object. This client script adds a /barrier command for a quick test:
RegisterCommand('barrier', function()
local model = `barrier_blue`
RequestModel(model)
while not HasModelLoaded(model) do Wait(0) end
local pos = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 2.0, 0.0)
local obj = CreateObject(model, pos.x, pos.y, pos.z, true, false, false)
PlaceObjectOnGroundProperly(obj)
SetModelAsNoLongerNeeded(model)
end)Other ways to use it:
- Map editors and placement tools take the spawn name wherever they ask for a model or object name.
- Maps (.ymap) reference it by the same name. The prop resource must run on the server as well.
- Scripts such as props for jobs, shops or emotes use the name in their config.
Variant packs on the server
A pack is one resource: one folder, one ensure line. Name the folder after the pack, for example barrier, and every skin spawns by its own name:
ensure barrierbarrier_blue
barrier_yellow
barrier_neonDo not install a single reskin and a pack that use the same spawn name, for example our barrier_blue twice. Keep each name in one resource only.
ESX, QBCore and other scripts
A reskin is plain game files and does not depend on a framework. It works the same on ESX, QBCore, Qbox and standalone servers. Anything that takes a model name, such as a target script, a shop, an emote or a placement script, can use the new spawn name.
Note
If RequestModel never finishes, the game does not know the name. Check the folder, the ensure line and the spelling, and that the server was restarted. See the prop does not spawn. A name rejected in the studio shows collides with a vanilla GTA object name or names the reserved prefix.