fivem icon indicating copy to clipboard operation
fivem copied to clipboard

feat(game/five): save pure level

Open someone005 opened this issue 6 months ago • 8 comments

Goal of this PR

This PR saves players time when connecting to servers with sv_pureLevel > 0. Currently, joining such servers requires a game restart every time, and this change eliminates that need.

How is this PR achieving the goal

Save pure level to CitizenFX.ini to avoid game restart when joining pure servers

This PR applies to the following area(s)

FiveM

Successfully tested on

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.

someone005 avatar Jun 22 '25 16:06 someone005

Gonna do when I get home 👍

someone005 avatar Jun 23 '25 08:06 someone005

I'm a bit worried about how this may come off as confusing for players that switch between pure and non-pure servers. Imagine the following scenario:

  • You install Reshade
  • You join a pure mode server, the game restarts, PureLevel=1/2 gets saved in the ini
  • You quit the game and start it again, it loads in pure mode.
  • You now join a non-pure mode (0) server but your mods don't work. Nevertheless, it saves PureLevel=0 in the ini, because it reads it from the server configuration.
  • You restart your game, it loads in pure level 0, and you join the second server again. Now suddenly your mods work.

Feels confusing that after joining a pure mode server, your first join on a non-pure mode server will have mods disabled for no reason, but subsequent joins will work fine.

Gogsi avatar Jun 23 '25 08:06 Gogsi

Hmmm, we can do something like this: when player's connecting to server without changing game build and user pure level >= server pure level we would ask him if he would like to change the pure mode. If no, he will continue with current one, if yes, game will restart. When player has to change game build, we will change the pure level automatically.

someone005 avatar Jun 23 '25 09:06 someone005

Hmmm, we can do something like this: when player's connecting to server without changing game build and user pure level >= server pure level we would ask him if he would like to change the pure mode. If no, he will continue with current one, if yes, game will restart. When player has to change game build, we will change the pure level automatically.

I think it makes sense to ask players if they want to lower their puremode level with automatic skip after 5 seconds and load with puremode

prikolium-cfx avatar Jun 23 '25 09:06 prikolium-cfx

@prikolium-cfx can you review and test latest commit?

someone005 avatar Jul 03 '25 20:07 someone005

This would be a major benefit to the community if we could get this in - big blocker for small/medium servers to get people to join is that players are constantly needing to restart to change pure mode level. 🙏

alberttheprince avatar Nov 07 '25 01:11 alberttheprince

This would be a major benefit to the community if we could get this in - big blocker for small/medium servers to get people to join is that players are constantly needing to restart to change pure mode level. 🙏

i dont really see how it matters the size of the community, majority of servers use pure mode its not exclusive to any size of servers

ook3D avatar Nov 07 '25 02:11 ook3D

This would be a major benefit to the community if we could get this in - big blocker for small/medium servers to get people to join is that players are constantly needing to restart to change pure mode level. 🙏

i dont really see how it matters the size of the community, majority of servers use pure mode its not exclusive to any size of servers

users are less willing to restart every play session for a smaller pop-server, large servers use pure mode because user's are invested/play exclusively on that server.

It's the reason the majority of servers don't use puremode.

alberttheprince avatar Nov 07 '25 20:11 alberttheprince