Skip to content

Added static ID support and option to toggle it in config - #1202

Closed
itzzzpanda wants to merge 1 commit into
qbcore-fivem:mainfrom
itzzzpanda:main
Closed

Added static ID support and option to toggle it in config#1202
itzzzpanda wants to merge 1 commit into
qbcore-fivem:mainfrom
itzzzpanda:main

Conversation

@itzzzpanda

@itzzzpanda itzzzpanda commented Sep 7, 2025

Copy link
Copy Markdown

Added Static IDs Support . Option to toggle the creation of it.

Files Changed:
config.lua
server/commands.lua
server/functions.lua
server/player.lua
server/main.lua

Much Love

@Mustachedom

Copy link
Copy Markdown
Contributor

Seems like it could be a good idea. There are some issues that I can see coming up

With the config option it allows people to not use this. Which generally isn't a bad idea but since it will be used as an identifier (like citizenid, license, etc) some developers may start to use that as a unique parameter which isn't a bad thing in itself but will cause a lot of problems if people don't use that.

Its one of those things where I really like the idea, but I can see a lot of potential issues down the line

@itzzzpanda

Copy link
Copy Markdown
Author

What you are saying is right, I think in this version I did not add a function that I think of after the PR. Basically a function like the one in commands.lua, where based on the choice, it will get you the player based on that value. I am open to pr all qb scripts to use this structure. But wanna know before if it has a chance to be added

@Z3rio Z3rio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hm, I feel like the whole "CreatePlayerId" functionality and so on is unneeded, aswell as the adding of another "userId" column.
If this is to be implemented, we should definentiely just use the already existing "id" column. As to reduce duplication, improve backwards compatibility, and so on.

This could've been / should be a lot simpler, this feels way too complex for no reason, it just creates unnecessary "breaking points".

@itzzzpanda

Copy link
Copy Markdown
Author

Hm, I feel like the whole "CreatePlayerId" - [ ] functionality and so on is unneeded, aswell as the adding of another "userId" column.
If this is to be implemented, we should definentiely just use the already existing "id" column. As to reduce duplication, improve backwards compatibility, and so on.

This could've been / should be a lot simpler, this feels way too complex for no reason, it just creates unnecessary "breaking points".

Thanks for the opinion. This would've been a simpler modification, but there are cases where people do not want to use this static ID, and in a future update there may be a security patch. Done this so it is not required to do this. If making an obligation to use static ids, It'll be way easier

@github-actions

Copy link
Copy Markdown

This PR has had 60 days of inactivity & will close within 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants