mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 15:01:26 +00:00
chore(coding-style): correct indentation
This commit is contained in:
+36
-36
@@ -1,5 +1,5 @@
|
||||
--==================================================================================
|
||||
--====== ESX_IDENTITY BY ARKSEYONET @Ark ======
|
||||
--====== ESX_IDENTITY BY ARKSEYONET @Ark ======
|
||||
--====== YOU CAN FIND ME ON MY DISCORD @Ark - https://discord.gg/cGHHxPX ======
|
||||
--====== IF YOU ALTER THIS VERSION OF THE SCRIPT, PLEASE GIVE ME CREDIT ======
|
||||
--====== Special Thanks To COSHAREK FOR THE UI Design ======
|
||||
@@ -14,24 +14,24 @@ function getIdentity(source)
|
||||
local result = MySQL.Sync.fetchAll("SELECT * FROM characters WHERE identifier = @identifier", {
|
||||
['@identifier'] = identifier
|
||||
})
|
||||
if result[1] ~= nil then
|
||||
local identity = result[1]
|
||||
|
||||
return {
|
||||
firstname = identity['firstname'],
|
||||
lastname = identity['lastname'],
|
||||
dateofbirth = identity['dateofbirth'],
|
||||
sex = identity['sex'],
|
||||
height = identity['height']
|
||||
}
|
||||
else
|
||||
return {
|
||||
firstname = '',
|
||||
lastname = '',
|
||||
dateofbirth = '',
|
||||
sex = '',
|
||||
height = ''
|
||||
}
|
||||
if result[1] ~= nil then
|
||||
local identity = result[1]
|
||||
|
||||
return {
|
||||
firstname = identity['firstname'],
|
||||
lastname = identity['lastname'],
|
||||
dateofbirth = identity['dateofbirth'],
|
||||
sex = identity['sex'],
|
||||
height = identity['height']
|
||||
}
|
||||
else
|
||||
return {
|
||||
firstname = '',
|
||||
lastname = '',
|
||||
dateofbirth = '',
|
||||
sex = '',
|
||||
height = ''
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,16 +39,16 @@ end
|
||||
--== Create The Player's Identification ==
|
||||
--===============================================
|
||||
function createIdentity(identifier, data)
|
||||
MySQL.Sync.execute(
|
||||
'INSERT INTO characters (identifier, firstname, lastname, dateofbirth, sex, height) VALUES (@identifier, @firstname, @lastname, @dateofbirth, @sex, @height)',
|
||||
{
|
||||
['@identifier'] = identifier,
|
||||
['@firstname'] = data.firstname,
|
||||
['@lastname'] = data.lastname,
|
||||
['@dateofbirth'] = data.dateofbirth,
|
||||
['@sex'] = data.sex,
|
||||
['@height'] = data.height
|
||||
})
|
||||
MySQL.Sync.execute(
|
||||
'INSERT INTO characters (identifier, firstname, lastname, dateofbirth, sex, height) VALUES (@identifier, @firstname, @lastname, @dateofbirth, @sex, @height)',
|
||||
{
|
||||
['@identifier'] = identifier,
|
||||
['@firstname'] = data.firstname,
|
||||
['@lastname'] = data.lastname,
|
||||
['@dateofbirth'] = data.dateofbirth,
|
||||
['@sex'] = data.sex,
|
||||
['@height'] = data.height
|
||||
})
|
||||
end
|
||||
|
||||
--===============================================
|
||||
@@ -63,11 +63,11 @@ end)
|
||||
--== Player Loaded Event Handler ==
|
||||
--===============================================
|
||||
AddEventHandler('es:playerLoaded', function(source)
|
||||
local result = getIdentity(source)
|
||||
if result.firstname == '' then
|
||||
Wait(500)
|
||||
TriggerClientEvent('esx_identity:showRegisterIdentity', source)
|
||||
else
|
||||
print('Player Has An Identity. Continuing.')
|
||||
end
|
||||
local result = getIdentity(source)
|
||||
if result.firstname == '' then
|
||||
Wait(500)
|
||||
TriggerClientEvent('esx_identity:showRegisterIdentity', source)
|
||||
else
|
||||
print('Player Has An Identity. Continuing.')
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user