N3MTV / gcphone

Téléphone pour FiveM
104 stars 228 forks source link

EssentialMode Ditch (es_extended) #304

Open NotixOfficial opened 4 years ago

NotixOfficial commented 4 years ago

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

leroydev commented 4 years ago

I'm working on this at the moment, I'll make a PR when I'm finished

NotixOfficial commented 4 years ago

I already did ill send here when i come home

NotixOfficial commented 4 years ago

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

Neofliix commented 4 years ago

I just tested but it doesn't work for me

leroydev commented 4 years ago

@Neofliix what about this PR? #306

Neofliix commented 4 years ago

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

rex2630 commented 4 years ago

Everything fixed, thank me later: https://github.com/N3MTV/gcphone/pull/305

sobhansetoodeh commented 4 years ago

@rex2630 Let's Thank you now, :0