RegisterServerEvent('isim:cektir')
AddEventHandler('isim:cektir', function()
local _src = source
local player = ESX.GetPlayerFromId(source)
xPlayer = player.identifier
MySQL.Async.fetchAll('SELECT * FROM users WHERE identifier = @identifier', {
['@identifier'] = player.identifier
}, function (result)
for _, v in ipairs(result) do
items = {["firstname"] = v.firstname, ["lastname"] = v.lastname}
TriggerClientEvent("updateNameClient", _src, items.firstname, items.lastname) -- bu evente gerek yok
end
end)
end)