title: xPlayer is null just after a player login
body: <p>I have a FiveM script on the server side. The script fails to set <code>xPlayer</code> when I connect, when I reload the script once connected to the server everything works as expected.</p>
  <pre><code>RegisterServerEvent(&quot;eventScript:Ping&quot;, function()
       local _source = source
        Citizen.Wait(3000)
       print('Source: '.._source)
       local xPlayer = ESX.GetPlayerFromId(_source)
        print('xPlayer : '..ESX.GetPlayerFromId(_source))  
      if not gameInfo.PlayerTeams[_source] then
          gameInfo.PlayerTeams[_source] = {
              [&quot;Team&quot;] = xPlayer.job.name == 'army' and team2 or team1,
              [&quot;Position&quot;] = GetEntityCoords(GetPlayerPed(_source)),
              [&quot;IsConnected&quot;] = true
          } 
      end
  end)
  </code></pre>