Why FiveM players download your resources again
What makes the FiveM client download files it already has, and how to keep downloads after an update small.
Players expect to download your server once. When they end up on the download screen again after every update, they complain, and some stop joining. Here is how FiveM decides what to download and what you can do to keep it small.
How the client decides
When a player connects, your server sends a list of every file the client needs, each with a hash of its contents. The client compares those hashes with the files in its own cache. Same hash, no download. A different hash or a missing file means a download. So any change to a file's bytes makes every player download it again, even if the change is tiny.
Scripts come as one package per resource
This is the part most server owners do not know. FXServer packs a resource's client scripts, shared scripts and everything listed under files in its fxmanifest into one file, resource.rpf. Players download that package as a whole.
So if a resource has 40 MB of images and sounds for its UI listed under files, and you fix one line in its client script, every player downloads all 40 MB again. Streamed assets in the stream folder work differently. Each one is a separate file with its own hash, so players only download the ones you changed.
Common reasons for downloading again
- Updating a resource that bundles large UI files with scripts you edit often.
- Replacing a whole vehicle or clothing pack for one small fix. If the pack was exported again, every file in it may have changed, even the ones you did not touch.
- Changing adhesive_cdnKey. The key changes the bytes of every file, so all players download everything again.
- Players clearing their FiveM cache, often because someone told them to.
- Resources that write files into their own folder on start, for example generated config files listed under files.
How to keep it small
- Keep large UI assets in their own resource. Put images, sounds and fonts in a resource you rarely touch, and the scripts you edit often in another.
- Group your updates. Ten small updates to the same resource on ten different days means players download it ten times.
- Copy only the files you changed. Do not replace a whole pack when one file is different.
- Pick an adhesive_cdnKey once and keep it.
- Shrink oversized assets. Big textures make every download larger. Our post on oversized assets explains how.
When a big download cannot be avoided
Some updates are big, and every player needs the new files. What matters then is where they come from. From your server, a big update plus a restart means hundreds of players downloading from one machine at the same time. With a CDN such as FiveMCDN, your server sends each changed file once and players get it from a location near them. Read how server-side resource caching works, or go to the quickstart.