Skip to content

Commit

Permalink
fix: database error npwd
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jan 25, 2024
1 parent 27d8c3c commit dbc3fba
Show file tree
Hide file tree
Showing 225 changed files with 5,406 additions and 3,687 deletions.
3 changes: 2 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,5 @@ fix lint error: unused argument last; accessing undefined variable Invoke; unuse
76. [esx_multicharacter]: fix: fixed problem which prevented the menu from opening @bitpredator
77. [esx_notify]: refactor: formatting(all): Format with prettier and lua formatter @bitpredator
78. [esx_progressbar]: refactor: formatting(all): Format with prettier and lua formatter @bitpredator
79. [esx_society]: refactor: (esx_society): complete rebuild for esx_society @bitpredator
79. [esx_society]: refactor: (esx_society): complete rebuild for esx_society @bitpredator
80. [npwd]: fix: database error npwd @bitpredator
90 changes: 50 additions & 40 deletions server-data/[SQL]/es_extended.sql
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ CREATE TABLE IF NOT EXISTS `datastore_data` (
PRIMARY KEY (`id`),
UNIQUE KEY `index_datastore_data_name_owner` (`name`,`owner`),
KEY `index_datastore_data_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=135 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.datastore_data: ~74 rows (circa)
-- Dump dei dati della tabella es_extended.datastore_data: ~145 rows (circa)
INSERT INTO `datastore_data` (`id`, `name`, `owner`, `data`) VALUES
(1, 'society_ammu', NULL, '\'{}\''),
(2, 'society_baker', NULL, '\'{}\''),
Expand Down Expand Up @@ -406,7 +406,18 @@ INSERT INTO `datastore_data` (`id`, `name`, `owner`, `data`) VALUES
(131, 'property', NULL, '{}'),
(132, 'property', NULL, '{}'),
(133, 'property', NULL, '{}'),
(134, 'property', NULL, '{}');
(134, 'property', NULL, '{}'),
(135, 'property', NULL, '{}'),
(136, 'property', NULL, '{}'),
(137, 'property', NULL, '{}'),
(138, 'property', NULL, '{}'),
(139, 'property', NULL, '{}'),
(140, 'property', NULL, '{}'),
(141, 'property', NULL, '{}'),
(142, 'property', NULL, '{}'),
(143, 'property', NULL, '{}'),
(144, 'property', NULL, '{}'),
(145, 'property', NULL, '{}');

-- Dump della struttura di tabella es_extended.fine_types
CREATE TABLE IF NOT EXISTS `fine_types` (
Expand All @@ -421,56 +432,56 @@ CREATE TABLE IF NOT EXISTS `fine_types` (
INSERT INTO `fine_types` (`id`, `label`, `amount`, `category`) VALUES
(1, 'Usage abusif du klaxon', 30, 0),
(2, 'Franchir une ligne continue', 40, 0),
(3, 'Circulation à contresens', 250, 0),
(4, 'Demi-tour non autorisé', 250, 0),
(3, 'Circulation à contresens', 250, 0),
(4, 'Demi-tour non autorisé', 250, 0),
(5, 'Circulation hors-route', 170, 0),
(6, 'Non-respect des distances de sécurité', 30, 0),
(7, 'Arrêt dangereux / interdit', 150, 0),
(8, 'Stationnement gênant / interdit', 70, 0),
(9, 'Non respect de la priorité à droite', 70, 0),
(10, 'Non-respect à un ©hicule prioritaire', 90, 0),
(6, 'Non-respect des distances de sécurité', 30, 0),
(7, 'Arrêt dangereux / interdit', 150, 0),
(8, 'Stationnement gênant / interdit', 70, 0),
(9, 'Non respect de la priorité à droite', 70, 0),
(10, 'Non-respect à un véhicule prioritaire', 90, 0),
(11, 'Non-respect d\'un stop', 105, 0),
(12, 'Non-respect d\'un feu rouge', 130, 0),
(13, '©passement dangereux', 100, 0),
(14, '©hicule non en état', 100, 0),
(13, 'Dépassement dangereux', 100, 0),
(14, 'Véhicule non en état', 100, 0),
(15, 'Conduite sans permis', 1500, 0),
(16, '©lit de fuite', 800, 0),
(17, 'Excès de vitesse < 5 kmh', 90, 0),
(18, 'Excès de vitesse 5-15 kmh', 120, 0),
(19, 'Excès de vitesse 15-30 kmh', 180, 0),
(20, 'Excès de vitesse > 30 kmh', 300, 0),
(16, 'Délit de fuite', 800, 0),
(17, 'Excès de vitesse < 5 kmh', 90, 0),
(18, 'Excès de vitesse 5-15 kmh', 120, 0),
(19, 'Excès de vitesse 15-30 kmh', 180, 0),
(20, 'Excès de vitesse > 30 kmh', 300, 0),
(21, 'Entrave de la circulation', 110, 1),
(22, '©gradation de la voie publique', 90, 1),
(23, 'Trouble à l\'ordre publique', 90, 1),
(24, 'Entrave opération de police', 130, 1),
(22, 'Dégradation de la voie publique', 90, 1),
(23, 'Trouble à l\'ordre publique', 90, 1),
(24, 'Entrave opération de police', 130, 1),
(25, 'Insulte envers / entre civils', 75, 1),
(26, 'Outrage à agent de police', 110, 1),
(26, 'Outrage à agent de police', 110, 1),
(27, 'Menace verbale ou intimidation envers civil', 90, 1),
(28, 'Menace verbale ou intimidation envers policier', 150, 1),
(29, 'Manifestation illégale', 250, 1),
(29, 'Manifestation illégale', 250, 1),
(30, 'Tentative de corruption', 1500, 1),
(31, 'Arme blanche sortie en ville', 120, 2),
(32, 'Arme ©thale sortie en ville', 300, 2),
(33, 'Port d\'arme non autorisé (©faut de license)', 600, 2),
(34, 'Port d\'arme illégal', 700, 2),
(32, 'Arme léthale sortie en ville', 300, 2),
(33, 'Port d\'arme non autorisé (défaut de license)', 600, 2),
(34, 'Port d\'arme illégal', 700, 2),
(35, 'Pris en flag lockpick', 300, 2),
(36, 'Vol de voiture', 1800, 2),
(37, 'Vente de drogue', 1500, 2),
(38, 'Fabriquation de drogue', 1500, 2),
(39, 'Possession de drogue', 650, 2),
(40, 'Prise d\'ôtage civil', 1500, 2),
(41, 'Prise d\'ôtage agent de l\'état', 2000, 2),
(40, 'Prise d\'ôtage civil', 1500, 2),
(41, 'Prise d\'ôtage agent de l\'état', 2000, 2),
(42, 'Braquage particulier', 650, 2),
(43, 'Braquage magasin', 650, 2),
(44, 'Braquage de banque', 1500, 2),
(45, 'Tir sur civil', 2000, 3),
(46, 'Tir sur agent de l\'état', 2500, 3),
(46, 'Tir sur agent de l\'état', 2500, 3),
(47, 'Tentative de meurtre sur civil', 3000, 3),
(48, 'Tentative de meurtre sur agent de l\'état', 5000, 3),
(48, 'Tentative de meurtre sur agent de l\'état', 5000, 3),
(49, 'Meurtre sur civil', 10000, 3),
(50, 'Meurte sur agent de l\'état', 30000, 3),
(50, 'Meurte sur agent de l\'état', 30000, 3),
(51, 'Meurtre involontaire', 1800, 3),
(52, 'Escroquerie à l\'entreprise', 2000, 2);
(52, 'Escroquerie à l\'entreprise', 2000, 2);

-- Dump della struttura di tabella es_extended.items
CREATE TABLE IF NOT EXISTS `items` (
Expand Down Expand Up @@ -532,7 +543,7 @@ INSERT INTO `job_grades` (`id`, `job_name`, `grade`, `name`, `label`, `salary`,
(6, 'mechanic', 0, 'recrue', 'Recrue', 12, '{}', '{}'),
(7, 'mechanic', 1, 'novice', 'Novice', 24, '{}', '{}'),
(8, 'mechanic', 2, 'experimente', 'Experimente', 36, '{}', '{}'),
(9, 'mechanic', 3, 'chief', 'Chef d\'équipe', 48, '{}', '{}'),
(9, 'mechanic', 3, 'chief', 'Chef d\'équipe', 48, '{}', '{}'),
(10, 'mechanic', 4, 'boss', 'Patron', 0, '{}', '{}'),
(11, 'police', 0, 'recruit', 'Recrue', 20, '{}', '{}'),
(12, 'police', 1, 'officer', 'Officier', 40, '{}', '{}'),
Expand Down Expand Up @@ -700,7 +711,7 @@ CREATE TABLE IF NOT EXISTS `npwd_match_profiles` (
UNIQUE KEY `identifier_UNIQUE` (`identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.npwd_match_profiles: ~0 rows (circa)
-- Dump dei dati della tabella es_extended.npwd_match_profiles: ~1 rows (circa)

-- Dump della struttura di tabella es_extended.npwd_match_views
CREATE TABLE IF NOT EXISTS `npwd_match_views` (
Expand Down Expand Up @@ -828,8 +839,7 @@ CREATE TABLE IF NOT EXISTS `npwd_twitter_profiles` (
KEY `identifier` (`identifier`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.npwd_twitter_profiles: ~0 rows (circa)
INSERT INTO `npwd_twitter_profiles` (`id`, `profile_name`, `identifier`, `avatar_url`, `createdAt`, `updatedAt`) VALUES
-- Dump dei dati della tabella es_extended.npwd_twitter_profiles: ~1 rows (circa)

-- Dump della struttura di tabella es_extended.npwd_twitter_reports
CREATE TABLE IF NOT EXISTS `npwd_twitter_reports` (
Expand Down Expand Up @@ -861,7 +871,7 @@ CREATE TABLE IF NOT EXISTS `npwd_twitter_tweets` (
PRIMARY KEY (`id`) USING BTREE,
KEY `npwd_twitter_tweets_npwd_twitter_profiles_id_fk` (`profile_id`) USING BTREE,
CONSTRAINT `npwd_twitter_tweets_npwd_twitter_profiles_id_fk` FOREIGN KEY (`profile_id`) REFERENCES `npwd_twitter_profiles` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.npwd_twitter_tweets: ~0 rows (circa)

Expand Down Expand Up @@ -906,7 +916,7 @@ CREATE TABLE IF NOT EXISTS `ox_inventory` (
UNIQUE KEY `owner` (`owner`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.ox_inventory: ~4 rows (circa)
-- Dump dei dati della tabella es_extended.ox_inventory: ~0 rows (circa)

-- Dump della struttura di tabella es_extended.rented_vehicles
CREATE TABLE IF NOT EXISTS `rented_vehicles` (
Expand Down Expand Up @@ -959,7 +969,7 @@ CREATE TABLE IF NOT EXISTS `users` (
PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.users: ~0 rows (circa)
-- Dump dei dati della tabella es_extended.users: ~1 rows (circa)

-- Dump della struttura di tabella es_extended.user_licenses
CREATE TABLE IF NOT EXISTS `user_licenses` (
Expand All @@ -984,7 +994,7 @@ CREATE TABLE IF NOT EXISTS `uteknark1` (
KEY `stage` (`stage`,`time`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Dump dei dati della tabella es_extended.uteknark1: ~1 rows (circa)
-- Dump dei dati della tabella es_extended.uteknark1: ~0 rows (circa)

-- Dump della struttura di tabella es_extended.vehicles
CREATE TABLE IF NOT EXISTS `vehicles` (
Expand Down Expand Up @@ -1248,7 +1258,7 @@ CREATE TABLE IF NOT EXISTS `vehicle_categories` (
-- Dump dei dati della tabella es_extended.vehicle_categories: ~11 rows (circa)
INSERT INTO `vehicle_categories` (`name`, `label`) VALUES
('compacts', 'Compacts'),
('coupes', 'Coupés'),
('coupes', 'Coupés'),
('motorcycles', 'Motos'),
('muscle', 'Muscle'),
('offroad', 'Off Road'),
Expand Down
84 changes: 73 additions & 11 deletions server-data/resources/[phone]/npwd/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@
"exportResource": "ox_inventory",
"exportFunction": "newPlayer"
},
"customPhoneNumber": {
"enabled": false,
"exportResource": "number-generator-resource",
"exportFunction": "generateNumber"
},
"general": {
"useResourceIntegration": true,
"toggleKey": "f1",
"toggleCommand": "phone",
"defaultLanguage": "en"
"defaultLanguage": "en",
"showId": false,
"phoneNumberFormat": "/(\\d{3})(\\d{3})(\\d{4})/"
},
"contacts": {
"frameworkPay": false,
"payResource": "my-core-resource",
"payFunction": "myCheckerFunction"
},
"profanityFilter": {
"enabled": false,
"badWords": ["esx"]
},
"database": {
"useIdentifierPrefix": false,
"playerTable": "users",
Expand All @@ -27,23 +30,82 @@
"profileQueries": true,
"phoneNumberColumn": "phone_number"
},
"images": {
"url": "https://api.fivemanage.com/api/image",
"type": "image",
"imageEncoding": "webp",
"contentType": "multipart/form-data",
"useContentType": false,
"authorizationHeader": "Authorization",
"authorizationPrefix": "",
"useAuthorization": true,
"useWebhook": true,
"returnedDataIndexes": ["url"]
},
"imageSafety": {
"filterUnsafeImageUrls": true,
"embedUnsafeImages": false,
"embedUrl": "https://i.example.com/embed",
"safeImageUrls": [
"i.imgur.com",
"i.file.glass",
"dropbox.com",
"c.tenor.com",
"discord.com",
"cdn.discordapp.com",
"media.discordapp.com",
"media.discordapp.net",
"upload.wikipedia.org",
"i.projecterror.dev",
"upcdn.io",
"i.fivemanage.com",
"api.fivemanage.com",
"r2.fivemanage.com"
]
},
"profanityFilter": {
"enabled": false,
"badWords": ["esx"]
},
"twitter": {
"showNotifications": true,
"generateProfileNameFromUsers": true,
"allowEditableProfileName": true,
"allowDeleteTweets": true,
"allowReportTweets": true,
"allowRetweet": true,
"characterLimit": 160,
"newLineLimit": 10,
"enableAvatars": true,
"enableEmojis": true,
"enableImages": true,
"maxImages": 1,
"resultsLimit": 25
},
"match": {
"generateProfileNameFromUsers": true,
"allowEditableProfileName": true
},
"marketplace": {
"persistListings": false
},
"browser": {
"homepageUrl": "https://docs.fivemanage.com"
},
"debug": {
"level": "error",
"enabled": true,
"sentryEnabled": true
},
"defaultContacts": [],
"disabledApps": [],
"images": {
"useWebhook": true
},
"apps": [
"npwd_services"
],
"voiceMessage": {
"enabled": false,
"authorizationHeader": "PE-Secret",
"url": "",
"authorizationHeader": "Authorization",
"url": "https://api.fivemanage/api/audio",
"returnedDataIndexes": ["url"]
}
}
}
Loading

0 comments on commit dbc3fba

Please sign in to comment.