Open NotixOfficial opened 4 years ago
I'm working on this at the moment, I'll make a PR when I'm finished
I already did ill send here when i come home
Just replace it with:
function getSourceFromIdentifier(identifier, cb) local xPlayers = ESX.GetPlayers() for i=1, #xPlayers, 1 do local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) if (xPlayer.identifier ~= nil and xPlayer.identifier == identifier) or (xPlayer.identifier == identifier) then cb(xPlayer.source) return end end cb(nil) end
I just tested but it doesn't work for me
@Neofliix what about this PR? #306
Currently when a new player joins the server the phone number is not assigned. When a user adds a contact it adds their Steam id
FR: Actuellement quand un nouveau joueur rejoins le serveur le numéro de téléphone n'est pas attribué. Quand un utilisateur ajoute un contact cela ajoute son id steam
Everything fixed, thank me later: https://github.com/N3MTV/gcphone/pull/305
@rex2630 Let's Thank you now, :0
Because of essentialmode is ditched by esx, we can not use anymore any functions with essentialmode code. One example function getSourceFromIdentifier(identifier, cb) TriggerEvent("es:getPlayers", function(users) for k , user in pairs(users) do if (user.getIdentifier ~= nil and user.getIdentifier() == identifier) or (user.identifier == identifier) then cb(k) return end end end) cb(nil) end