Citizen.CreateThread(
function()
AddEventHandler(
"playerConnecting",
function(name, setKickReason, deferrals)
local steamID = "n/a"
for k, v in ipairs(GetPlayerIdentifiers(source)) do
if string.sub(v, 1, string.len("steam:")) == "steam:" then
steamID = v
end
MySQL.Async.fetchAll(
"SELECT * FROM users WHERE identifier = @identifier",
{
["@identifier"] = steamID
},
function(result)
if result[1].group == "user" then
deferrals.done("Yetkin Yetersiz.")
CancelEvent()
end
end
)
end
end
)
end
)