chore(coding-style): correct indentation

This commit is contained in:
Romain Lanz
2017-09-14 16:49:54 +02:00
parent aa394e1eb8
commit 4eb84d19eb
5 changed files with 65 additions and 56 deletions
+9
View File
@@ -0,0 +1,9 @@
root = true
[*]
indent_size = 2
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+5 -5
View File
@@ -6,8 +6,8 @@ server_script "server.lua"
ui_page('html/index.html')
files({
'html/index.html',
'html/script.js',
'html/style.css',
'html/cursor.png'
})
'html/index.html',
'html/script.js',
'html/style.css',
'html/cursor.png',
})
+7 -7
View File
@@ -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 ======
@@ -45,11 +45,11 @@ end)
--== Register Callback ==
--===============================================
RegisterNUICallback('register', function(data, cb)
myIdentity = data
TriggerServerEvent('esx_identity:createIdentity', data)
EnableGui(false)
Wait (500)
TriggerEvent('esx_skin:openSaveableMenu')
myIdentity = data
TriggerServerEvent('esx_identity:createIdentity', data)
EnableGui(false)
Wait (500)
TriggerEvent('esx_skin:openSaveableMenu')
end)
--===============================================
@@ -73,4 +73,4 @@ Citizen.CreateThread(function()
end
Citizen.Wait(0)
end
end)
end)
+8 -8
View File
@@ -1,11 +1,11 @@
USE `essentialmode`;
CREATE TABLE `characters` (
`identifier` varchar(255) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`dateofbirth` varchar(255) NOT NULL,
`sex` varchar(1) NOT NULL DEFAULT 'f',
`height` varchar(128) NOT NULL
);
`identifier` varchar(255) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`dateofbirth` varchar(255) NOT NULL,
`sex` varchar(1) NOT NULL DEFAULT 'f',
`height` varchar(128) NOT NULL
);
+36 -36
View File
@@ -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)