ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
server

GetPlayerIdentifiers

FiveM server native documentation with a Lua example.

Summary

Returns a table of a player's identifiers (license, steam, discord, ip, etc.). The reliable way to identify a player, unlike their changeable name.

Returns

table — array of identifier strings.

Parameters

sourcenumberThe player's server ID.

Example

-- SERVER
local ids = GetPlayerIdentifiers(source)
for _, id in ipairs(ids) do
  if string.find(id, 'license:') then
    print('License: ' .. id)
  end
end

Common pitfalls

  • Prefer the license: identifier as a stable primary key — steam may be missing if the player isn't on Steam.
  • This is server-side only; identifiers must never be trusted from the client.

Related natives

Related guides

FiveM scripts done right

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.

Browse Scripts →