Hi there guys,
What with the elements stating that FiveM will possibly lose the ability to track steamID, I had begun writing resources to use the license column stored in the users table.
Then I began getting failures.
I tracked it down to the license returned in identifiers did not match what was stored in the users table.
The way I’ve been checking serverside for job and job_grade:
local _source = source
local _sourceID = GetPlayerIdentifiers(_source)
local xPlayer = ESX.GetPlayerFromId(_source)
for k,v in pairs(_sourceID) do
if string.sub(v, 1, string.len("license:")) == "license:" then
_sourceLicense = v
end
end
MySQL.Async.fetchAll('SELECT `job`, `job_grade` FROM `users` WHERE `license` = @license LIMIT 1', { ['@license'] = _sourceLicense }, function(jobDeets)
if jobDeets[1] ~= nil then
and it fails to match sometimes. I have long time players that are returning different licenses than that which is stored:
returned: license:xxxxx4c880b416074403725a140a445705635599
stored: license:xxxxx16c4584de6c4016e4f597a1b5bc48b3d26b
So I’ve had to alter the checks to use the steamID(which is being threatened to disappear).
local _source = source
local _sourceID = GetPlayerIdentifiers(_source)
local xPlayer = ESX.GetPlayerFromId(_source)
for k,v in pairs(_sourceID) do
if string.sub(v, 1, string.len("license:")) == "license:" then
_sourceLicense = v
elseif string.sub(v, 1, string.len("steam:")) == "steam:" then
_sourceSteam = v
end
end
MySQL.Async.fetchAll('SELECT `job`, `job_grade` FROM `users` WHERE `license` = @license or identifier = @steam LIMIT 1', { ['@license'] = _sourceLicense, ['@steam'] = _sourceSteam }, function(jobDeets)
if jobDeets[1] ~= nil then
In the topic on the forums discussing the disappearance of the steamID, the elements pretty much called the people that stated that licenses changed idiots, claiming that they did not but I’ve got users proving otherwise.
Has anyone else run across this issue where the licenses stored in the users rows do not match those returned by identifiers? With the steamID disappearance hanging over our heads, I’d like to get away from them but SteamID’s NEVER fail to match on our server while licenses do.