diff --git a/README.md b/README.md index 245ce49c..5910aa92 100644 --- a/README.md +++ b/README.md @@ -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/. diff --git a/__resource.lua b/__resource.lua index 98d1297c..5e0be4f0 100644 --- a/__resource.lua +++ b/__resource.lua @@ -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' diff --git a/client/main.lua b/client/main.lua index 0f73ec65..30f8ad0a 100644 --- a/client/main.lua +++ b/client/main.lua @@ -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 diff --git a/esx_identity.sql b/esx_identity.sql index 93b31f5a..29e512f6 100644 --- a/esx_identity.sql +++ b/esx_identity.sql @@ -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`) -); +); \ No newline at end of file