[HELP ME] Spawn mysql player

Hello

The code that has in this moment is that the spawn works well

RegisterNetEvent(‘es_freeroam:spawnPlayer’)
AddEventHandler(‘es_freeroam:spawnPlayer’, function(x, y, z, model)
exports.spawnmanager:spawnPlayer({x = x, y = y, z = z, model = model})
end)

But I do but this one more than spawn screws black

RegisterServerEvent(‘playerSpawn’)
AddEventHandler(‘playerSpawn’, function()
local player = GetPlayerIdentifiers(source)[1]
local executed_query = MySQL:executeQuery(“SELECT * FROM users_pos WHERE identifier = ‘@identifier’”, {[’@identifier’] = player})
local result = MySQL:getResults(executed_query, {‘pos_x’, ‘pos_y’, ‘pos_z’}, “identifier”)

if(result)then
	for k,v in ipairs(result)do
  print(v.x, v.y, v.z)
  local x = v.pos_x
  local y = v.pos_y
  local z = v.pos_z
  end
end

TriggerClientEvent('es_roleplay:spawnPlayer', source, x, y, z)

end)