Configurations
Advanced Starterpack Configurations
Using GetPlayerIdentifiers
vs Player.identifier
/ Player.PlayerData.citizenid
GetPlayerIdentifiers
vs Player.identifier
/ Player.PlayerData.citizenid
In this section, we'll compare the use of GetPlayerIdentifiers
with Player.identifier
or Player.PlayerData.citizenid
for player identification in scripts. This comparison will highlight the advantages and drawbacks of each approach, especially in multicharacter environments.
1. GetPlayerIdentifiers
Overview: Retrieves player identifiers like Rockstar license (
license:
), Steam ID (steam:
), and Discord ID (discord:
) from external platforms.Best For: Ensuring a consistent and secure identification method across all characters, as the identifiers are tied to external services.
Security: Difficult to exploit, since these identifiers are tied to accounts outside of the game.
Drawback: Doesn't differentiate between multiple characters for the same player, as the external identifier remains the same across all characters.
2. Player.identifier
or Player.PlayerData.citizenid
Overview: These are server framework-dependent identifiers (e.g.,
identifier
in ESX andcitizenid
in QBCore) tied to either the player or specific characters.Best For: Multi-character servers where each character needs a unique identifier.
Drawback: In multi-character setups, it can be exploited. For example, players could delete and recreate characters to bypass mechanisms like starter packs, since these identifiers can change with each new character.
Comparison Table
Aspect | GetPlayerIdentifiers | Player.identifier / Player.PlayerData.citizenid |
---|---|---|
Source | External (Rockstar, Steam, Discord) | Internal (Server Framework - ESX, QBCore, etc.) |
Consistency | Consistent across all characters | Unique to each character (in multi-character setups) |
Security | Harder to spoof, tied to external accounts | Easier to exploit, especially in multi-character setups |
Multi-Character Support | Not ideal for differentiating between characters | Ideal for differentiating between characters |
Exploits (e.g., Starter Pack) | Hard to exploit (external ID remains the same) | Players can delete and recreate characters to exploit |
Framework Dependency | Framework-agnostic | Dependent on specific server framework |
Best For | Reliable identification across all characters | Differentiating between characters in multi-character servers |
Use
GetPlayerIdentifiers
for more secure, consistent player identification across all characters.Use
Player.identifier
orPlayer.PlayerData.citizenid
to uniquely identify individual characters in multi-character servers, but ensure you have additional measures to prevent exploitation.
EnableConfig.UsePlayerLicense
(set to true
) for secure and consistent player identification across all characters. This ensures that the player's external identifier (like Rockstar license, Steam ID, or Discord ID) remains the same, preventing exploits like recreating characters to claim rewards again.
SetConfig.UsePlayerLicense
to false
if you want to uniquely identify individual characters in multi-character servers. However, you should implement additional safeguards (e.g., using external identifiers for backup checks) to prevent players from exploiting mechanisms by deleting and recreating characters.
Last updated