feat(esx_core) Add optional player identifier type.#1675
Conversation
Kr3mu
left a comment
There was a problem hiding this comment.
Add checking if identifier is nil due to invalid source in ESX.GetIdentifier.
Kr3mu
left a comment
There was a problem hiding this comment.
After small fixes with Esx.GetIdentifier in multicharacters works.
LGTM
|
@Zykem Please update the docs so we can merge it |
|
i thought @Mycroft-Studios said this.
|
|
Sure, but just to clarify: this doesn't force anyone to stop using license. It's an optional tool for people who want more flexibility. Yeah, Discord and Steam can be abused, same with literally anything if your system doesn't handle it right. But that’s on the server to secure, not the framework to block. It’s up to each server owner to decide which identifiers to trust and how to mitigate risks. We're just providing the tools, not enforcing how they should be used. Also, this is entirely optional, no server is being forced to move away from license. At the end of the day, we all have different opinions and needs, that’s what makes open source great. Everyone can build what works best for their own use case. |
|
That's what i literally said.
Anyways, this is a great PR really glad to see this got merged. This is exactly what i was aiming for in my last PR #1517. |
Description
This PR introduces a configurable way to choose the player identifier type used by ESX.
Currently, es_extended hardcodes the "license" identifier, but the codebase is already compatible with other types like "steam" or "discord".
This change adds a server-side convar & Config Value to allow server owners to select their preferred identifier type without modifying the source code.
Motivation
Implementation Details
Usage Example
Change
server.cfg: "set esx:identifier discord"Or
Change
shared/config/main.lua:Config.Identifier = "discord"PR Checklist