diff --git a/README.md b/README.md index 79b83fa8..8826cb16 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ There is two types of accounts: shared and not shared. - None-shared accounts are created for every user in the server. They are created in db when player is loaded, Example: property black money ### `addon_account` database information -You must create an account in the database +An addon account must be configured in the database before using it. Don't forget to run a server restart afterwards (you can alternative restart the script and relog all clients) | `name` | `label` | `shared` | | -------- | ------- | -------- | diff --git a/esx_addonaccount.sql b/esx_addonaccount.sql index 95e9e703..5b42b181 100644 --- a/esx_addonaccount.sql +++ b/esx_addonaccount.sql @@ -1,17 +1,18 @@ USE `essentialmode`; CREATE TABLE `addon_account` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `label` varchar(255) NOT NULL, - `shared` int(11) NOT NULL, - PRIMARY KEY (`id`) + `name` varchar(60) NOT NULL, + `label` varchar(255) NOT NULL, + `shared` int(11) NOT NULL, + + PRIMARY KEY (`name`) ); CREATE TABLE `addon_account_data` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `account_name` varchar(255) DEFAULT NULL, - `money` double NOT NULL, - `owner` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) + `id` int(11) NOT NULL AUTO_INCREMENT, + `account_name` varchar(255) DEFAULT NULL, + `money` double NOT NULL, + `owner` varchar(255) DEFAULT NULL, + + PRIMARY KEY (`id`) );