Skip to content

feat(game/five): save pure level #3471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

someone005
Copy link
Contributor

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

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

@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Jun 22, 2025
Copy link
Collaborator

@prikolium-cfx prikolium-cfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution, but as additional challenge I want to suggest you to also implement logic to pass players with higher pure level on server. Currently pure level should be strictly equal to server pure level, but server do not lose anything if joining player has pure2 and server is on pure0.

@someone005
Copy link
Contributor Author

Gonna do when I get home 👍

@Gogsi
Copy link
Contributor

Gogsi commented Jun 23, 2025

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.

@someone005
Copy link
Contributor Author

someone005 commented Jun 23, 2025

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.

@prikolium-cfx
Copy link
Collaborator

prikolium-cfx commented Jun 23, 2025

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

@someone005
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants