fivem icon indicating copy to clipboard operation
fivem copied to clipboard

feat(server): add command to reload resource client file

Open poco8537 opened this issue 4 months ago • 4 comments

Goal of this PR

This PR adds a command to reload a specific resource’s client files from the file server. Using this command ensures that subsequent players (or for streamed assets, when fetched later) will load the updated files.

The key difference from ensure/restart is that it applies to players who join afterwards rather than affecting current players immediately.

How is this PR achieving the goal

Adds the reloadclientfile command to reload a specific resource’s client files from the file server.

This PR applies to the following area(s)

Server

Successfully tested on

Game builds: N/A

Platforms: Windows

Checklist

  • [x] Code compiles and has been tested successfully.
  • [x] Code explains itself well and/or is documented.
  • [x] My commit message explains what the changes do and what they are for.
  • [x] No extra compilation warnings are added by these changes.

Fixes issues

N/A

poco8537 avatar Aug 09 '25 15:08 poco8537

Good idea

tjsdn5956 avatar Aug 09 '25 15:08 tjsdn5956

Why would this be better than using ensure/restart? I would have thought that having some clients having different code to others may cause more issues?
I'm not a proper developer so genuinely interested on what this would help.

Firecul avatar Aug 14 '25 16:08 Firecul

Why would this be better than using ensure/restart? I would have thought that having some clients having different code to others may cause more issues? I'm not a proper developer so genuinely interested on what this would help.

If there are 500 players on a server and you restart a script, it will cause a lot of network traffic. Also, if you update files such as weapon files, there is a high chance that the game will crash.

This is one of the most useful PRs I've seen so far. Thank you.

V3SC avatar Aug 14 '25 16:08 V3SC

Would definitely love to see some movement on this PR - i think if implemented correctly would be a great tool for quick fixing bugs and issues if needed without having to disrupt the entire the server via restart.

Gravxd avatar Oct 28 '25 01:10 Gravxd