How to save steam-identifier in mysql in qb-core

hello. I want to save steam-identifier in mysql when player is joining in my qbcore server but it prints 1 instead of steam-identifier
this is Client Code that i tested :

local function OnPlayerConnecting(name, setKickReason, deferrals)
  local player = source
  local steamIdentifier
  local identifiers = GetPlayerIdentifiers(player)
  deferrals.defer()

  -- mandatory wait!
  Wait(0)

  deferrals.update(string.format("Hello %s. Your Steam ID is being checked.", name))

  for _, v in pairs(identifiers) do
      if string.find(v, "steam") then
          steamIdentifier = v
          break
      end
  end

  -- mandatory wait!
  Wait(0)

  if not steamIdentifier then
      deferrals.done("You are not connected to Steam.")
  else
      TriggerServerEvent("setSteam", steamIdentifier)
      deferrals.done()
  end
end

AddEventHandler("playerConnecting", OnPlayerConnecting)

and this is Server Code that i tested :

RegisterNetEvent("setSteam")
AddEventHandler("setSteam", function(source, steamIdentifier)
    print(steamIdentifier)
end)

Thank for your help

Not sure why you’d want to rely on some 3rd-party service for your players to join your server but here you go

:warning::warning: Steam Ditch :warning::warning: · qbcore-framework/qb-core@0603076 (github.com)

thank you.
im sorry i didn’t get that i mean can you tell me in which file qbcore saves license in players table

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.