Shopping Cart

The Store You, Never Seen Before !

phone

Phone Number Issues ESX Server

phone
esx phone issue

Hi, since the new version of ESX essentialmode was removed and now you need to change some things server.lua

Change this

AddEventHandler('es:playerLoaded',function(source)
local sourcePlayer = tonumber(source)
local identifier = getPlayerID(source)
getOrGeneratePhoneNumber(sourcePlayer, identifier, function (myPhoneNumber)

TriggerClientEvent("gcPhone:myPhoneNumber", sourcePlayer, myPhoneNumber)
TriggerClientEvent("gcPhone:contactList", sourcePlayer, getContacts(identifier))
TriggerClientEvent("gcPhone:allMessage", sourcePlayer, getMessages(identifier)) end) end)

To Thisย 

AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
local sourcePlayer = tonumber(xPlayer.source)
 local identifier = xPlayer.identifier 
getOrGeneratePhoneNumber(sourcePlayer, identifier, function (myPhoneNumber)

TriggerClientEvent("gcPhone:myPhoneNumber", sourcePlayer, myPhoneNumber)
TriggerClientEvent("gcPhone:contactList", sourcePlayer, getContacts(identifier))
TriggerClientEvent("gcPhone:allMessage", sourcePlayer, getMessages(identifier)) end) end)

I Hope, this will fix your issue on your server.ย 

Leave a Reply
Delivery

We Provide instant release of our product opon purchase

Easy return policy

If you think the product have some errors you can easily return it.

International Warranty

Offered in the country of usage

100% Secure Checkout

PayPal / MasterCard / Visa / Jazz Cash / Easypaisa