mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Fixes(maybe
This commit is contained in:
+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
-3
@@ -20,11 +20,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
-21
@@ -8,15 +8,7 @@ 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)
|
||||
@@ -106,7 +98,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,20 +107,13 @@ 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)
|
||||
@@ -172,7 +157,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 +191,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