Minor improvements

This commit is contained in:
ElPumpo
2018-06-04 22:15:30 +02:00
parent f23b5458a8
commit 5161c009ba
4 changed files with 26 additions and 19 deletions
+10 -1
View File
@@ -30,5 +30,14 @@ start esx_identity
/chardel
```
# Legal
### License
This script is licensed under GPLv3, see the [license](LICENSE)
esx_identity - rp characters
Copyright (C) 2015-2018 Jérémie N'gadi
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.
+3 -5
View File
@@ -1,5 +1,3 @@
-- https://wiki.fivem.net/wiki/Resource_manifest
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
description 'ESX Identity'
@@ -9,9 +7,9 @@ version '1.0.3'
client_script 'client/main.lua'
server_scripts {
"@mysql-async/lib/MySQL.lua",
"@es_extended/locale.lua",
"server/main.lua"
'@mysql-async/lib/MySQL.lua',
'@es_extended/locale.lua',
'server/main.lua'
}
ui_page 'html/index.html'
+3 -3
View File
@@ -37,10 +37,10 @@ AddEventHandler("esx_identity:saveID", function(data)
end)
RegisterNUICallback('escape', function(data, cb)
if hasIdentity == true then
if hasIdentity then
EnableGui(false)
else
TriggerEvent("chatMessage", "^1[IDENTITY]", {255, 255, 0}, "You must create your first character in order to play.")
TriggerEvent('chat:addMessage', { args = { '^1[IDENTITY]', '^1You must create your first character in order to play' } })
end
end)
@@ -119,7 +119,7 @@ end)
function verifyName(name)
-- Don't allow short user names
local nameLength = string.len(name)
if nameLength > 25 or nameLength < 5 then
if nameLength > 25 or nameLength < 2 then
return 'Your player name is either too short or too long.'
end
+10 -10
View File
@@ -1,21 +1,21 @@
USE `essentialmode`;
ALTER TABLE `users`
ALTER TABLE `users` (
ADD COLUMN `firstname` VARCHAR(50) NULL DEFAULT '',
ADD COLUMN `lastname` VARCHAR(50) NULL DEFAULT '',
ADD COLUMN `dateofbirth` VARCHAR(25) NULL DEFAULT '',
ADD COLUMN `sex` VARCHAR(10) NULL DEFAULT '',
ADD COLUMN `height` VARCHAR(5) NULL DEFAULT ''
;
);
CREATE TABLE `characters` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`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 'M',
`height` VARCHAR(128) NOT NULL,
PRIMARY KEY (`id`)
);
);