mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
+1
-3
@@ -65,7 +65,7 @@ if not Config.UseDeferrals then
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
Citizen.Wait(5)
|
||||
|
||||
if guiEnabled then
|
||||
DisableControlAction(0, 1, true) -- LookLeftRight
|
||||
@@ -87,8 +87,6 @@ if not Config.UseDeferrals then
|
||||
DisableControlAction(0, 143, true) -- disable melee
|
||||
DisableControlAction(0, 75, true) -- disable exit vehicle
|
||||
DisableControlAction(27, 75, true) -- disable exit vehicle
|
||||
else
|
||||
Citizen.Wait(500)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
+3
-4
@@ -9,7 +9,6 @@ Config.EnableCommands = true
|
||||
-- Changes the identifiers from Rockstar License To Steam. In order to use this, you will have to have
|
||||
-- made edits to your ESX in order to use Steam identifiers all around, because new ESX uses Rockstar
|
||||
-- license. I just made it easier for people that convert to steam identifiers.
|
||||
Config.UseSteamID = false
|
||||
|
||||
-- [Config.UseDeferrals]
|
||||
-- EXPERIMENTAL Character Registration Method. This will allow players to create identities in deferrals
|
||||
@@ -20,11 +19,11 @@ Config.UseDeferrals = false -- EXPERIMENTAL Character Registration Method.
|
||||
|
||||
|
||||
-- These values are for the second input validation in server/main.lua
|
||||
Config.MaxNameLength = 16
|
||||
Config.MinHeight = 48
|
||||
Config.MaxNameLength = 20
|
||||
Config.MinHeight = 45
|
||||
Config.MaxHeight = 96
|
||||
Config.LowestYear = 1900
|
||||
Config.HighestYear = 2020
|
||||
Config.HighestYear = 2021
|
||||
|
||||
Config.FullCharDelete = false
|
||||
Config.EnableDebugging = false
|
||||
|
||||
+6
-23
@@ -8,22 +8,13 @@ if Config.UseDeferrals then
|
||||
deferrals.defer()
|
||||
local playerId, identifier = source
|
||||
Citizen.Wait(100)
|
||||
|
||||
if Config.UseSteamID then
|
||||
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
|
||||
if string.match(v, 'steam:') then
|
||||
identifier = v
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
|
||||
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
|
||||
if string.match(v, 'license:') then
|
||||
identifier = string.sub(v, 9)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if identifier then
|
||||
MySQL.Async.fetchAll('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = @identifier', {
|
||||
@@ -106,7 +97,7 @@ if Config.UseDeferrals then
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
end
|
||||
|
||||
Citizen.Wait(1000)
|
||||
Citizen.Wait(5)
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source)
|
||||
|
||||
@@ -115,27 +106,19 @@ if Config.UseDeferrals then
|
||||
xPlayer.kick(_('missing_identity'))
|
||||
end
|
||||
end)
|
||||
|
||||
elseif not Config.UseDeferrals then
|
||||
AddEventHandler('playerConnecting', function(playerName, setKickReason, deferrals)
|
||||
deferrals.defer()
|
||||
local playerId, identifier = source
|
||||
Citizen.Wait(100)
|
||||
Citizen.Wait(40)
|
||||
|
||||
if Config.UseSteamID then
|
||||
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
|
||||
if string.match(v, 'steam:') then
|
||||
identifier = v
|
||||
break
|
||||
end
|
||||
end
|
||||
else
|
||||
for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
|
||||
if string.match(v, 'license:') then
|
||||
identifier = string.sub(v, 9)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if identifier then
|
||||
MySQL.Async.fetchAll('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = @identifier', {
|
||||
@@ -172,7 +155,7 @@ elseif not Config.UseDeferrals then
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
Citizen.Wait(1000)
|
||||
Citizen.Wait(300)
|
||||
|
||||
while not ESX do
|
||||
Citizen.Wait(10)
|
||||
@@ -206,7 +189,7 @@ elseif not Config.UseDeferrals then
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
end
|
||||
|
||||
Citizen.Wait(1000)
|
||||
Citizen.Wait(10)
|
||||
TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source)
|
||||
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
|
||||
Reference in New Issue
Block a user