-
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/dependencies/nui/input/shadow.js b/server-data/resources/[esx]/EasyAdmin/dependencies/nui/input/shadow.js
deleted file mode 100644
index 1801933ce..000000000
--- a/server-data/resources/[esx]/EasyAdmin/dependencies/nui/input/shadow.js
+++ /dev/null
@@ -1,74 +0,0 @@
-(function() {
- var Filters = {}
-
- var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
- svg.setAttribute('style', 'display:block;width:0px;height:0px')
- var defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs')
-
- var blurFilter = document.createElementNS('http://www.w3.org/2000/svg', 'filter')
- blurFilter.setAttribute('id', 'svgBlurFilter')
- var feGaussianFilter = document.createElementNS('http://www.w3.org/2000/svg', 'feGaussianBlur')
- feGaussianFilter.setAttribute('stdDeviation', '0 0')
- blurFilter.appendChild(feGaussianFilter)
- defs.appendChild(blurFilter)
- Filters._svgBlurFilter = feGaussianFilter
-
- // Drop Shadow Filter
- var dropShadowFilter = document.createElementNS('http://www.w3.org/2000/svg', 'filter')
- dropShadowFilter.setAttribute('id', 'svgDropShadowFilter')
- var feGaussianFilter1 = document.createElementNS('http://www.w3.org/2000/svg', 'feGaussianBlur')
- feGaussianFilter1.setAttribute('in', 'SourceAlpha')
- feGaussianFilter1.setAttribute('stdDeviation', '3')
- dropShadowFilter.appendChild(feGaussianFilter1)
- Filters._svgDropshadowFilterBlur = feGaussianFilter1
-
- var feOffset = document.createElementNS('http://www.w3.org/2000/svg', 'feOffset')
- feOffset.setAttribute('dx', '0')
- feOffset.setAttribute('dy', '0')
- feOffset.setAttribute('result', 'offsetblur')
- dropShadowFilter.appendChild(feOffset)
- Filters._svgDropshadowFilterOffset = feOffset
-
- var feFlood = document.createElementNS('http://www.w3.org/2000/svg', 'feFlood')
- feFlood.setAttribute('flood-color', 'rgba(0,0,0,1)')
- dropShadowFilter.appendChild(feFlood)
- Filters._svgDropshadowFilterFlood = feFlood
-
- var feComposite = document.createElementNS('http://www.w3.org/2000/svg', 'feComposite')
- feComposite.setAttribute('in2', 'offsetblur')
- feComposite.setAttribute('operator', 'in')
- dropShadowFilter.appendChild(feComposite)
- var feComposite1 = document.createElementNS('http://www.w3.org/2000/svg', 'feComposite')
- feComposite1.setAttribute('in2', 'SourceAlpha')
- feComposite1.setAttribute('operator', 'out')
- feComposite1.setAttribute('result', 'outer')
- dropShadowFilter.appendChild(feComposite1)
-
- var feMerge = document.createElementNS('http://www.w3.org/2000/svg', 'feMerge')
- var feMergeNode = document.createElementNS('http://www.w3.org/2000/svg', 'feMergeNode')
- feMerge.appendChild(feMergeNode)
- var feMergeNode1 = document.createElementNS('http://www.w3.org/2000/svg', 'feMergeNode')
- feMerge.appendChild(feMergeNode1)
- Filters._svgDropshadowMergeNode = feMergeNode1
- dropShadowFilter.appendChild(feMerge)
- defs.appendChild(dropShadowFilter)
- svg.appendChild(defs)
- document.documentElement.appendChild(svg)
-
- const blurScale = 1
- const scale = (document.body.clientWidth / 1280)
-
- Filters._svgDropshadowFilterBlur.setAttribute('stdDeviation',
- Number(blurScale) + ' ' +
- Number(blurScale)
- )
- Filters._svgDropshadowFilterOffset.setAttribute('dx',
- String(Number(Math.cos(45 * Math.PI / 180)) * scale))
- Filters._svgDropshadowFilterOffset.setAttribute('dy',
- String(Number(Math.sin(45 * Math.PI / 180)) * scale))
- Filters._svgDropshadowFilterFlood.setAttribute('flood-color',
- 'rgba(0, 0, 0, 1)')
- Filters._svgDropshadowMergeNode.setAttribute('in',
- 'SourceGraphic')
-
-})()
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/dependencies/nui/input/style.css b/server-data/resources/[esx]/EasyAdmin/dependencies/nui/input/style.css
deleted file mode 100644
index 1396a00fa..000000000
--- a/server-data/resources/[esx]/EasyAdmin/dependencies/nui/input/style.css
+++ /dev/null
@@ -1,129 +0,0 @@
-/* ====================================================
-Recreating the email field from https://webflow.com/cms. Just an experiment - not as cross-browser friendly as the original.
-Changed:
-- animated gradient bar to :after element
-- flexbox for layout
-==================================================== */
-html {
- box-sizing: border-box;
- font-size: 10px;
- }
-
- *, *:before, *:after {
- box-sizing: inherit;
- }
-
- body, ul, li {
- margin: 0;
- padding: 0;
- }
-
- li {
- list-style: none;
- }
-
- p, h1, h2, h3, h4, h5, h6 {
- margin-top: 0;
- }
-
- a {
- text-decoration: none;
- }
-
- input {
- border-style: none;
- background: transparent;
- outline: none;
- }
-
- button {
- padding: 0;
- background: none;
- border: none;
- outline: none;
- }
-
- body {
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- background: transparent;
- top: 50%;
- left: 50%;
- }
-
- .demo-flex-spacer {
- flex-grow: 1;
- }
-
- .container {
- display: flex;
- flex-direction: column;
- height: 100vh;
- max-width: 1600px;
- padding: 0 15px;
- margin: 0 auto;
- }
-
- .webflow-style-input {
- position: relative;
- display: none;
- flex-direction: row;
- width: 100%;
- max-width: 450px;
- margin: 0 auto;
- border-radius: 2px;
- padding: 1.4rem 2rem 1.6rem;
- background: rgba(57, 63, 84, 0.6);
- filter: url(#svgDropShadowFilter);
- }
-
- .webflow-style-button {
- position: absolute;
- right: 5px;
- top: 50%
- }
-
- .webflow-style-input:after {
- content: "";
- position: absolute;
- left: 0px;
- right: 0px;
- bottom: 0px;
- z-index: 999;
- height: 2px;
- border-bottom-left-radius: 2px;
- border-bottom-right-radius: 2px;
- background: linear-gradient(to right, #3C4E63, #526B86);
- }
-
- .webflow-style-input input {
- flex-grow: 1;
- color: #BFD2FF;
- font-size: 1.8rem;
- line-height: 2.4rem;
- vertical-align: middle;
- width:100%;
- }
-
- .webflow-style-text {
- color: #b5cafc;
- font-size: 1.6rem;
- margin-bottom: 0.3rem;
- vertical-align: middle;
- }
-
- .webflow-style-input input::-webkit-input-placeholder {
- color: #8B95B7;
- }
-
- .webflow-style-input button {
- color: #8B95B7;
- font-size: 2.4rem;
- line-height: 2.4rem;
- vertical-align: middle;
- transition: color 0.25s;
- }
- .webflow-style-input button:hover {
- color: #BFD2FF;
- }
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/fxmanifest.lua b/server-data/resources/[esx]/EasyAdmin/fxmanifest.lua
deleted file mode 100644
index 34093b4c4..000000000
--- a/server-data/resources/[esx]/EasyAdmin/fxmanifest.lua
+++ /dev/null
@@ -1,86 +0,0 @@
-fx_version "cerulean"
-
-games {"gta5"}
-
-author 'Blumlaut '
-description 'EasyAdmin - Admin Menu for FiveM'
-version '7.02'
-
-
-lua54 'yes'
-
-shared_script 'shared/util_shared.lua'
-
-server_scripts {
- "server/*.lua",
- "server/bot/*.js",
- "plugins/**/*_shared.lua",
- "plugins/**/*_server.lua"
-}
-
-client_scripts {
- "dependencies/NativeUI.lua",
- "dependencies/Controls.lua",
- "client/*.lua",
- "plugins/**/*_shared.lua",
- "plugins/**/*_client.lua"
-}
-
-ui_page "dependencies/nui/index.html"
-
-files {
- "dependencies/images/*.png",
- "dependencies/nui/**/*"
-}
-
-dependencies {
- 'yarn'
-}
-
-provide 'EasyAdmin'
-
-
-convar_category 'EasyAdmin' {
- "Configuration Options",
- {
- { "EasyAdmin language", "$ea_LanguageName", "CV_STRING", "en" },
- { "Default key to open the menu", "$ea_defaultKey", "CV_STRING", "none" },
- { "The Minimum Amount of Identifiers", "$ea_minIdentifierMatches", "CV_INT", "2" },
- { "Display banlist checking progress", "$ea_presentDeferral", "CV_BOOL", "true" },
- { "Moderation Actions Webhook", "$ea_moderationNotification", "CV_STRING", "false" },
- { "Report Notifications Webhook", "$ea_reportNotification", "CV_STRING", "false" },
- { "Detail Notifications Webhook", "$ea_detailNotification", "CV_STRING", "false" },
- { "Set a custom DateTime format", "$ea_dateFormat", "CV_STRING", "%d/%m/%Y %H:%M:%S" },
- { "Image Uploader", "$ea_screenshoturl", "CV_STRING", "none" },
- { "Screenshot Field Name", "$ea_screenshotfield", "CV_STRING", "files[]" },
- { "JSON String arguments", "$ea_screenshotOptions", "CV_STRING", "{}" },
- { "Screenshot on Report", "$ea_enableReportScreenshots", "CV_BOOL", "true" },
- { "Webhook Identifier", "$ea_logIdentifier", "CV_STRING", "steam" },
- { "Enable calladmin Command", "$ea_enableCallAdminCommand", "CV_BOOL", "true" },
- { "Enable report Command", "$ea_enableReportCommand", "CV_BOOL", "true" },
- { "calladmin Command Name", "$ea_callAdminCommandName", "CV_STRING", "calladmin" },
- { "report Command Name", "$ea_reportCommandName", "CV_STRING", "report" },
- { "calladmin Cooldown (seconds)", "$ea_callAdminCooldown", "CV_INT", "60" },
- { "Minimum Reports to Ban Someone", "$ea_defaultMinReports", "CV_INT", "3" },
- { "Report Ban Time (unix time)", "$ea_ReportBanTime", "CV_INT", "86400" },
- { "Allow Minimum Report Count", "$ea_MinReportModifierEnabled", "CV_BOOL", "true" },
- { "Minimum Amount of Players to enable Report Modifier", "$ea_MinReportPlayers", "CV_INT", "12" },
- { "Divisor of Player Count to get minimum reports needed count", "$ea_MinReportModifier", "CV_BOOL", "true" },
- { "Amount of Warns before Actions", "$ea_maxWarnings", "CV_INT", "3" },
- { "Maximum Warn Action", "$ea_warnAction", "CV_STRING", "kick" },
- { "Maximum Warn Ban Time (unix time)", "$ea_warningBanTime", "CV_INT", "604800" },
- { "Hide IP in the GUI", "$ea_IpPrivacy", "CV_BOOL", "true" },
- { "Banlist Backup Time (hours)", "$ea_backupFrequency", "CV_INT", "72" },
- { "Maximum Backup Count", "$ea_maxBackupCount", "CV_INT", "10" },
- { "Chat Reminder Time (minutes, disabled if 0)", "$ea_chatReminderTime", "CV_INT", "0" },
- { "Time before Cached Player Expires", "$ea_playerCacheExpiryTime", "CV_INT", "900" },
- { "Set Debug Level", "$ea_logLevel", "CV_INT", "1" },
- { "Enable Custom Banlist", "$ea_custombanlist", "CV_BOOL", "false" },
- { "Use Tokens as Identifiers", "$ea_useTokenIdentifiers", "CV_BOOL", "true" },
- { "Enable Ascii Art on Start", "$ea_enableSplash", "CV_BOOL", "true" },
- { "Token for Discord bot", "$ea_botToken", "CV_STRING", "none" },
- { "Channel for Discord bot to log", "$ea_botLogChannel", "CV_STRING", "none" },
- { "Channel for Discord bot to enable live status", "$ea_botStatusChannel", "CV_STRING", "true" },
- { "Enable Allowlist", "$ea_enableAllowlist", "CV_BOOL", "false" }
- }
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/language/de.json b/server-data/resources/[esx]/EasyAdmin/language/de.json
deleted file mode 100644
index 55e78aa11..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/de.json
+++ /dev/null
@@ -1,239 +0,0 @@
-[{
- "translator": "EasyAdmin, zRxnx",
- "language": "de",
- "on": "An",
- "off": "Aus",
-
- "spectatingUser": "Schaue ~b~%s ~w~zu.",
- "stoppedSpectating": "Zuschauermodus verlassen.",
- "hour": "Stunde",
- "hours": "Stunden",
- "day": "Tag",
- "days": "Tage",
- "week": "Woche",
- "weeks": "Wochen",
- "month": "Monat",
- "months": "Monate",
- "year": "Jahr",
- "years": "Jahre",
- "customtime": "Eigener Zeitraum",
- "nocustombantime": "Du musst erst einen Zeitraum setzen!",
- "permanent": "Permanent",
- "confirm": "Bestätigen",
- "playermanagement": "Spielermanagement",
- "servermanagement": "Servermanagement",
- "settings": "Einstellungen",
- "kickplayer": "Spieler Kicken",
- "banplayer": "Spieler Bannen",
- "reason": "Grund",
- "kickreasonguide": "Kick Grund angeben.",
- "noreason": "Keinen Grund angegeben.",
- "confirmkick": "Kick bestätigen",
- "confirmkickguide": "~r~~h~ACHTUNG:~h~~w~ Durch das drücken von bestätigen wird der Spieler mit dem angegebenen Grund gekickt.",
- "banreasonguide": "Bann Grund angeben.",
- "banlength": "Bann Länge",
- "banlengthguide": "Wie lange soll der Spieler gebannt werden?",
- "confirmban": "Bann bestätigen",
- "confirmbanguide": "~r~~h~ACHTUNG:~h~~w~ Durch das drücken von bestätigen wird der Spieler mit dem angegebenen Grund gebannt.",
- "mute": "Spieler stummschalten",
- "muteguide": "~r~~h~ACHTUNG:~h~~w~ Dadurch wird verhindert, dass der Spieler den Text-Chat verwenden kann.",
- "adminmutedplayer": "**%s** hat **%s** gestummt",
- "adminunmutedplayer": "**%s** hat **%s** entstummt",
- "playermuted": "wurde stummgeschaltet!",
- "playerunmuted": "wurde entstummt!",
- "playermute": "Du bist stummgeschaltet!",
- "spectateplayer": "Spieler zuschauen",
- "teleportplayer": "Teleportieren",
- "teleporttoplayer": "Zum Spieler",
- "teleportplayertome": "Spieler zu mir",
- "slapplayer": "Spieler schlagen",
- "setplayerfrozen": "Spieler einfrieren",
- "allplayers": "Alle Spieler",
- "teleporttome": "Zu mir Teleportieren",
- "teleporttomeguide": "~r~~h~ACHTUNG:~h~~w~ Das wird ~h~alle~h~ Spieler zu dir Teleportieren.",
- "setgametype": "Spiel-Typ setzen",
- "setgametypeguide": "~r~~h~ACHTUNG:~h~~w~ Das wird den Spiel-Typ wie er auf der Serverliste angezeigt wird setzen.",
- "setmapname": "Karten Namen setzen",
- "setmapnameguide": "~r~~h~ACHTUNG:~h~~w~ Das wird den Karten Namen wie er auf der Serverliste angezeigt wird setzen.",
- "startresourcebyname": "Ressource mit Namen starten",
- "startresourcebynameguide": "~r~~h~ACHTUNG:~h~~w~ Das wird eine Ressource die auf dem server installiert ist starten.",
- "stopresourcebyname": "Ressource mit Namen stoppen",
- "stopresourcebynameguide": "~r~~h~ACHTUNG:~h~~w~ Das wird eine Ressource die auf dem server installiert ist stoppen.",
- "badidea": "Das würde ich lieber nicht tuhen.",
- "viewbanlist": "Bannliste ansehen",
- "unbanplayer": "Spieler entbannen",
- "unbanplayerguide": "~r~~h~ACHTUNG:~h~~w~ Durch das drücken von bestätigen wird der Spieler entbannt.",
- "banlistshowtype": "~h~Bannliste:~h~ Typ Anzeigen",
- "unbanreasons": "Gründe",
- "unbanlicenses": "Lizenzen",
- "banlistshowtypeguide": "Zwischen Gründen und Lizenzen wechseln .\nErfordert erneutes öffnen des Adminpanels.",
- "refreshbanlist": "Bannliste neu laden",
- "refreshbanlistguide": "Das wird die Bannliste neu laden.\nErfordert erneutes öffnen des Adminpanels.",
- "refreshpermissions": "Berechtigungen neu Laden",
- "refreshpermissionsguide": "Das wird deine jetzigen Berechtigungen neu laden.\nErfordert erneutes öffnen des Adminpanels.",
- "godmodedetected": "Godmode: ~r~Erkannt~w~",
- "godmodenotdetected": "Godmode: ~g~Nicht Erkannt~w~",
- "antiragdoll": "~r~Anti-Ragdoll~w~",
- "health": "Leben",
- "armor": "Rüstung",
- "wantedlevel": "Fahndungslevel",
- "exitspectator": "Drücke E um den Zuschauermodus zu verlassen.",
-
- "allowlist": "Du hast keine Berechtigung diesen Server zu betreten",
- "checkingallowlist": "Prüfe Allowlist..",
- "bannedjoin": "\nDu wurdest von diesem server gebannt, \nGrund: %s, \nBann Läuft am %s ab\nDeine Bann-ID lautet #%s.",
- "kicked": "Gekickt von %s, \nGrund: %s",
- "banned": "Du wurdest von diesem server gebannt, \nGrund: %s, \nBann Läuft am %s ab.",
- "reasonadd": " ( Spielername: %s ), \nGebannt von: %s",
- "nongiven": "Keinen gegeben",
- "announcement": "Announcement",
- "announcementguide": "Send an announcement to all players",
- "adminannouncement": "**%s** sent an announcement: **%s**",
- "playernotfound": "Spieler wurde nicht gefunden.",
- "done": "Fertig!",
- "adminkickedplayer": "**%s** hat **%s** gekickt, Grund: %s",
- "adminbannedplayer": "**%s** hat **%s** gebannt, Grund: %s, Bann entfällt: %s, ID: %s",
- "adminunbannedplayer": "**%s** hat **%s** entbannt. [ %s ]",
- "adminslappedplayer": "**%s** hat **%s** geschlagen **(%s Leben)**.",
-
- "adminfrozeplayer": "**%s** hat **%s** eingefroren.",
- "adminunfrozeplayer": "**%s** hat **%s** entfroren.",
-
- "left": "Links",
- "middle": "Mitte",
- "right": "Rechts",
- "menuOrientation": "Menüorientation",
- "menuOrientationguide": "Menü Orientation setzen ( Links, Rechts oder Mitte ) \nErfordert Spielneustart.",
- "menuOffset": "Menüoffset",
- "menuOffsetguide": "Menü länger machen.\nErfordert erneutes öffnen des Adminpanels.",
- "resetmenuOffset": "Menüoffset Zurücksetzen",
- "takescreenshot": "Screenshot erstellen",
- "admintookscreenshot": "**%s** hat ein Screenshot von **%s**'s Bildschirm Erstellt: %s",
- "screenshotinprogress": "Ein Screenshot wird bereits erstellt, bitte warten!",
- "screenshotlink": "Der Screenshot ist hier verfügbar: %s",
- "anonymous": "Anonymer Admin",
- "anonymousguide": "Blendet dein Namen aus, wenn du die EasyAdmin-Funktionen verwendest.",
- "adminofflinebannedplayer": "**%s** hat Offline-Spieler **%s** gebannt, Grund: %s, Bann Läuft am %s ab.",
- "cachedplayers": "Frühere Spieler",
- "refreshcachedplayers": "Frühere Spielerliste aktualisieren",
- "refreshcachedplayersguide": "Aktualisiert die Liste der früheren Spieler. Erfordert erneutes öffnen des Adminpanels.",
- "adminrequestedofflineinfo": "**%s** hat die Nutzerdaten des Spielers **%s** angefordert",
- "nextpage": "Nächste Seite»",
- "firstpage": "««Erste Seite",
- "lastpage": "Letzte Seite»»",
- "previouspage": "«Vorherige Seite",
- "playercalledforadmin": "Spieler %s ruft nach einem Admin!\nGrund: %s\nID: %s\n",
- "playerreportedplayer": "Spieler %s hat einen Spieler gemeldet!\n%s, Grund: %s\nReport %s/%s\nID: %s\n",
- "successfullyreported": "Spieler erfolgreich gemeldet!",
- "reportbantext": "Von %s Spielern in kurzer Zeit gemeldet.",
- "alreadyreported": "Du hast diesen Spieler schon gemeldet!",
- "reportedusageerror": "Fehler! Nutzung: /report Name Grund",
- "admincalled": "Ein Admin wurde erfolgreich gerufen!",
- "spectatedplayer": "**%s** hat **%s** zugesehen",
- "teleportedtoplayer": "**%s** teleportiert nach **%s**",
- "searchbans": "Bann suchen",
- "searchbansfail": "Es wurde kein Bann gefunden.",
- "identifier": "%s Identifier",
- "warnplayer": "Spieler warnen",
- "warnreasonguide": "Einen Grund zur Warnung hinzufügen.",
- "confirmwarn": "Warnung bestätigen",
- "confirmwarnguide": "~r~~h~ACHTUNG:~h~~w~ Durch das drücken von bestätigen wird der Spieler mit dem angegebenen Grund gewarnt.",
- "warnedtitle": "Warnung",
- "warnedby": "verwarnt durch",
- "warndismiss": "Halte die Leertaste für 10 Sekunden gedrückt, um die Warnung zu schließen.",
- "warned": "Du wurdest verwarnt, Grund: %s, Warnung %s/%s",
- "warnkicked": "Du wurdest gekickt, weil du zu oft verwarnt wurdest.",
- "warnbanned": "Du wurdest gebannt, weil du zu oft verwarnt wurdest.",
- "adminwarnedplayer": "**%s** hat **%s** gewarnt, Grund: %s, Warnung %s/%s",
-
- "searchuser": "Spieler suchen",
- "searchuserguide": "Spieler mit Spielernamen oder Server ID finden.",
-
- "setconvar": "Convar Setzen",
- "setconvarguide": "~r~~h~ACHTUNG:~h~~w~ Nur mit wissen anfassen!\nÄndert eine Convar.",
- "adminchangedconvar": "**%s** hat die Convar **%s** zu **%s** geändert.",
- "adminstartedresource": "**%s** hat die Ressource **%s** gestartet",
- "adminstoppedresource": "**%s** hat die Ressource **%s** gestoppt",
-
- "convarname": "Convar Name",
- "convarvalue": "Convar Inhalt",
-
- "cleanarea": "Gebiet aufräumen",
- "cleanareaguide": "Entfernt alle Gegenstände in der nähe.",
- "cars": "Fahrzeuge",
- "peds": "NPC's",
- "props": "Objekte",
- "cleaningcar": "Loesche Fahrzeug %s",
- "cleaningped": "Loesche NPC %s",
- "cleaningprop": "Loesche Objekt %s",
- "finishedcleaning": "Löschen von %s beendet.",
- "admincleanedup": "**%s** hat alle **%s** in einem **%s** radius gelöscht.",
- "radius": "Radius",
- "type": "Art",
- "deepclean":"Tiefe Reinigung",
- "deepcleanguide":"Löscht auch clientseitige Gegenstände.",
-
- "forceeasteregg": "Easter Egg aktivieren",
-
- "permissioneditor": "Permissions anpassen",
- "permissioneditorguide": "Permissions auf dem Server editieren, speichert nach ~g~easyadmin_permissions.cfg~w~.",
-
- "aces": "ACEs",
- "permission": "Permission",
- "principals": "Principals",
- "addace": "~g~ACE hinzufügen",
- "addaceguide": "Du kannst das ganze vor dem abspeichern nochmal editieren.",
- "addprincipal": "~g~Principal hinzufügen",
- "group": "Gruppe",
- "entergroup": "Gruppennamen einfügen (z.b. group.admin)",
- "enterperm": "Permissionnamen einfügen (z.b. easyadmin.player.kick)",
- "state": "Status",
- "stateguide": "Das verweigern von Permissions funktioniert nicht richtig. Erlaube nur die Permissions, die der Spieler haben soll.",
- "location": "Ort",
- "locationguide": "Dieser Wert kann nicht bearbeitet werden.",
- "principal": "Principal",
- "enterprincipal": "Principal einfügen (e.g. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Permission löschen",
- "deletepermissionguide": "~r~~h~ACHTUNG:~h~~w~ Dadurch wird die Permission vollständig widerrufen und gelöscht!",
- "deleteprincipal": "~r~Principal löschen",
- "deleteprincipalguide": "~r~~h~ACHTUNG:~h~~w~ Dadurch wird der Principal vollständig widerrufen und gelöscht!",
-
- "itemdeleted": "~r~Dieser Eintrag wurde gelöscht.",
- "savechanges": "~g~Änderungen speichern",
- "savechangesguide": "~r~~h~ACHTUNG:~h~~w~ Das kann nicht rückgängig gemacht werden!",
- "admineditedpermissions": "**%s** hat die Berechtigungen des Servers bearbeitet.",
-
- "reportviewer": "Report Viewer",
- "call": "Ruf",
- "report": "Report",
- "open": "Offen",
- "reporter": "Melder",
- "reported": "Gemelderter",
- "closereport": "Report schließen",
- "closesimilarreports": "~r~Ähnliche Reports schließen~w~",
- "closesimilarreportsguide": "Versucht ähnliche Reports zu finden und zu löschen.",
- "adminclosedreport": "**%s** hat Report #**%s** geschlossen.",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "refreshreports": "Reports aktualisieren",
- "refreshreportsguide": "Zeigt neue Reports an, falls es neue gibt seitdem das Menü geöffnet wurde.",
- "waitbeforeusingagain": "Du musst warten bevor du das benutzen kannst!",
- "invalidreport": "Du musst einen Grund angeben!",
- "claimreport": "Report übernehmen",
- "claimedby": "Übernommen von",
- "reportalreadyclaimed": "Dieser Report wurde bereits übernommen",
- "notification": "Benachrichtigung",
- "deferral": "Prüfe Bannliste, bitte warten... (%s%%)",
- "savebanchanges": "Änderungen speichern",
- "savebanguide": "~r~~h~ACHTUNG:~h~~w~ Durch das drücken von bestätigen wird der Bann überschrieben",
- "adminimmune": "Dazu hast du keine Rechte, der ausgewählte Spieler ist Immun",
- "teleportmeback": "Teleportiere mich zurück",
- "teleportplayerback": "Teleportiere Spieler zurück",
- "teleportintoclosestvehicle":"zum nächstliegenden Auto",
-
- "copiedtoclipboard": "Text wurde in die Zwischenablage kopiert!",
-
- "spectatevehicleseatoccupied": "Der Fahrzeugsitz auf dem du gesessen hast, ist jetzt besetzt",
- "spectatenovehiclefound": "Das Fahrzeug in dem du gesessen hast, wurde nicht mehr gefunden",
- "screenreader":"Screen Reader (TTS)",
- "screenreaderguide":"Aktiviert Text to Speech für die GUI"
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/language/en.json b/server-data/resources/[esx]/EasyAdmin/language/en.json
deleted file mode 100644
index 91035fcce..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/en.json
+++ /dev/null
@@ -1,240 +0,0 @@
-[{
- "translator": "EasyAdmin",
- "language": "en",
- "on": "On",
- "off": "Off",
- "spectatingUser": "Spectating ~b~%s.",
- "stoppedSpectating": "Stopped Spectating.",
- "hour": "Hour",
- "hours": "Hours",
- "day": "Day",
- "days": "Days",
- "week": "Week",
- "weeks": "Weeks",
- "month": "Month",
- "months": "Months",
- "year": "Year",
- "years": "Years",
- "customtime": "Custom Time",
- "nocustombantime": "You need to set a custom ban length first!",
- "permanent": "Permanent",
- "confirm": "Confirm",
- "playermanagement": "Player Management",
- "servermanagement": "Server Management",
- "settings": "Settings",
- "kickplayer": "Kick Player",
- "banplayer": "Ban Player",
- "reason": "Reason",
- "kickreasonguide": "Add a reason to the kick.",
- "noreason": "No Reason Specified",
- "confirmkick": "Confirm Kick",
- "confirmkickguide": "~r~~h~NOTE:~h~~w~ Pressing Confirm will kick this Player with the specified settings.",
- "banreasonguide": "Add a reason to the ban.",
- "banlength": "Ban Length",
- "banlengthguide": "Until when should the Player be banned?",
- "confirmban": "Confirm Ban",
- "confirmbanguide": "~r~~h~NOTE:~h~~w~ Pressing Confirm will ban this Player with the specified settings.",
- "mute": "Mute Player",
- "muteguide": "~r~~h~NOTE:~h~~w~ This will prevent the player from using the text chat.",
- "adminmutedplayer": "**%s** muted **%s**",
- "adminunmutedplayer": "**%s** unmuted **%s**",
- "playermuted": "has been muted!",
- "playerunmuted": "has been un-muted!",
- "playermute": "You are muted!",
- "spectateplayer": "Spectate Player",
- "teleportplayer": "Teleport",
- "teleporttoplayer": "Me to Player",
- "teleportplayertome": "Player to Me",
- "slapplayer": "Slap Player",
- "setplayerfrozen": "Set Player Frozen",
- "allplayers": "All Players",
- "teleporttome": "Teleport To Me",
- "teleporttomeguide": "~r~~h~NOTE:~h~~w~ This will teleport ~h~all~h~ players to you.",
- "setgametype": "Set Game Type",
- "setgametypeguide": "~r~~h~NOTE:~h~~w~ This will set the Game Type as listed on the Serverlist.",
- "setmapname": "Set Map Name",
- "setmapnameguide": "~r~~h~NOTE:~h~~w~ This will set the Map Name as listed on the Serverlist.",
- "startresourcebyname": "Start Resource by Name",
- "startresourcebynameguide": "~r~~h~NOTE:~h~~w~ This will start a resource installed on the server.",
- "stopresourcebyname": "Stop Resource by Name",
- "stopresourcebynameguide": "~r~~h~NOTE:~h~~w~ This will stop a resource installed on the server.",
- "badidea": "Don't do that, please.",
- "viewbanlist": "View Banlist",
- "unbanplayer": "Unban Player",
- "unbanplayerguide": "~r~~h~NOTE:~h~~w~ Pressing Confirm will unban this Player.",
- "banlistshowtype": "~h~Banlist:~h~ Show Type",
- "unbanreasons": "Reasons",
- "unbanlicenses": "Licenses",
- "banlistshowtypeguide": "Toggle Between Ban Reasons or Identifiers in the 'Unban Player' Menu.\nRequires Reopening.",
- "refreshbanlist": "Refresh Banlist",
- "refreshbanlistguide": "This Refreshes the Banlist in the 'Unban Player' Menu.\nRequires Reopening.",
- "refreshpermissions": "Refresh Permissions",
- "refreshpermissionsguide": "This Refreshes your current Permissions.\nRequires Reopening.",
- "godmodedetected": "Godmode: ~r~Detected~w~",
- "godmodenotdetected": "Godmode: ~g~None Detected~w~",
- "antiragdoll": "~r~Anti-Ragdoll~w~",
- "health": "Health",
- "armor": "Armor",
- "wantedlevel": "Wanted Level",
- "exitspectator": "Press E to exit spectator mode",
-
- "allowlist": "You are not allowlisted on this server",
- "checkingallowlist": "Checking allowlist..",
- "bannedjoin": "\nYou have been banned from this Server\n\nReason: %s\n\nBan Expires: %s\nYour Ban ID is #%s.",
- "kicked": "Kicked by %s, Reason: %s",
- "banned": "You have been banned from this Server, Reason: %s, Ban Expires: %s",
- "reasonadd": " ( Nickname: %s ), Banned by: %s",
- "nongiven": "None Provided",
- "announcement": "Announcement",
- "announcementguide": "Send an announcement to all players",
- "adminannouncement": "**%s** sent an announcement: **%s**",
- "playernotfound": "Player could not be found.",
- "done": "Done!",
- "adminkickedplayer": "**%s** kicked **%s**, Reason: %s",
- "adminbannedplayer": "**%s** banned **%s**, Reason: %s, Ban Expires: %s, ID: %s",
- "adminunbannedplayer": "**%s** unbanned **%s** [ %s ]",
- "adminslappedplayer": "**%s** slapped **%s** for **%s HP**",
-
- "adminfrozeplayer": "**%s** froze **%s**.",
- "adminunfrozeplayer": "**%s** unfroze **%s**.",
-
- "left": "Left",
- "middle": "Middle",
- "right": "Right",
- "menuOrientation": "Menu Orientation",
- "menuOrientationguide": "Set Menu Orientation ( Left, Right or Center ) \nRequires Game Restart.",
- "menuOffset": "Menu Offset",
- "menuOffsetguide": "Set Menu Size Offset\nRequires Re-opening of Menu.",
- "resetmenuOffset": "Reset Menu Offset",
- "takescreenshot": "Take Screenshot",
- "admintookscreenshot": "**%s** took a Screenshot of **%s**'s Screen: %s",
- "screenshotinprogress": "a Screenshot is already in progress, please wait!",
- "screenshotlink": "The Screenshot is available here: %s",
- "anonymous": "Anonymous Admin",
- "anonymousguide": "Hides your Name when using EasyAdmin Features.",
- "adminofflinebannedplayer": "**%s** offline banned **%s**, Reason: %s, Ban Expires: %s",
- "cachedplayers": "Cached Players",
- "refreshcachedplayers": "Refresh Cached Players",
- "refreshcachedplayersguide": "Refreshes List of Cached Players, requires reopening.",
- "adminrequestedofflineinfo": "**%s** requested User Data of Offline User **%s**",
- "nextpage": "Next Page»",
- "firstpage": "««First Page",
- "lastpage": "Last Page»»",
- "previouspage": "«Previous Page",
- "playercalledforadmin": "User %s calls for an admin!\nReason: %s\nID: %s\n",
- "playerreportedplayer": "User %s reported a player!\n%s, Reason: %s\nReport %s/%s\nID: %s\n",
- "successfullyreported": "Successfully reported the player!",
- "reportbantext": "Reported by %s Players in short time.",
- "alreadyreported": "You already reported this player!",
- "reportedusageerror": "Error! Usage: /report name reason",
- "admincalled": "Successfully called an Admin!",
- "spectatedplayer": "**%s** has Spectated **%s**",
- "teleportedtoplayer": "**%s** has Teleported to **%s**",
- "searchbans": "Search Bans",
- "searchbansfail": "No Ban with the Search Criteria was found.",
- "identifier": "%s Identifier",
- "warnplayer": "Warn Player",
- "warnreasonguide": "Add a reason to the Warn.",
- "confirmwarn": "Confirm Warn",
- "confirmwarnguide": "~r~~h~NOTE:~h~~w~ Pressing Confirm will Warn this Player with the specified settings.",
- "warnedtitle": "Warning",
- "warnedby": "warned by",
- "warndismiss": "Hold Spacebar for 10 Seconds to dismiss.",
- "warned": "You have been warned, Reason: %s, Warning %s/%s",
- "warnkicked": "You have been kicked due to getting Warned too many times.",
- "warnbanned": "Warned too many times.",
- "adminwarnedplayer": "**%s** warned **%s**, Reason: %s, Warning %s/%s",
-
- "searchuser": "Search for User",
- "searchuserguide": "Find a Player using their Username or ID",
-
- "setconvar": "Set Convar",
- "setconvarguide": "~r~NOTE: If you don't know what you are doing, don't touch this!~w~\nChanges a Convar",
- "adminchangedconvar": "**%s** changed convar **%s** to **%s**",
- "adminstartedresource": "**%s** started resource **%s**",
- "adminstoppedresource": "**%s** stopped resource **%s**",
-
- "convarname": "Convar Name",
- "convarvalue": "Convar Value",
-
- "cleanarea": "Cleanup Area",
- "cleanareaguide": "Cleans up all nearby entities of selected type",
- "cars": "Cars",
- "peds": "Peds",
- "props": "Props",
- "cleaningcar": "Deleting Vehicle %s",
- "cleaningped": "Deleting Ped %s",
- "cleaningprop": "Deleting Object %s",
- "finishedcleaning": "Finished cleaning %s",
- "admincleanedup": "**%s** Cleaned up all **%s** in a **%s** radius.",
- "radius": "Radius",
- "type": "Type",
- "deepclean":"Deep Clean",
- "deepcleanguide":"Also deletes clientside entities.",
-
- "forceeasteregg": "Force Easter Egg",
-
- "permissioneditor": "Permission Editor",
- "permissioneditorguide": "Edit Permissions on the Server, saves into ~g~easyadmin_permissions.cfg~w~",
-
- "aces": "ACEs",
- "permission": "Permission",
- "principals": "Principals",
- "addace": "~g~Add ACE",
- "addaceguide": "You have the opportunity to edit this before saving.",
- "addprincipal": "~g~Add Principal",
- "group": "Group",
- "entergroup": "Enter group name (e.g. group.admin)",
- "enterperm": "Enter Permission name (e.g. easyadmin.player.kick)",
- "state": "State",
- "stateguide": "Denying permissions does not work properly, only allow permissions you want the player to have.",
- "location": "Location",
- "locationguide": "This value cannot be edited.",
- "principal": "Principal",
- "enterprincipal": "Enter principal (e.g. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Delete Permission",
- "deletepermissionguide": "~r~Warning! This will completely revoke and delete the Permission!",
- "deleteprincipal": "~r~Delete Principal",
- "deleteprincipalguide": "~r~Warning! This will completely revoke and delete the Principal!",
-
- "itemdeleted": "~r~This Item has been deleted.",
- "savechanges": "~g~Save Changes",
- "savechangesguide": "~r~Warning! ~w~This cannot be undone!",
- "admineditedpermissions": "**%s** edited the server's permissions.",
-
- "reportviewer": "Report Viewer",
- "call": "Call",
- "report": "Report",
- "open": "Open",
- "reporter": "Reporter",
- "reported": "Reported",
- "closereport": "Close Report",
- "closesimilarreports": "~r~Close all similar reports~w~",
- "closesimilarreportsguide": "Will attempt to find and delete reports made by the same user.",
- "adminclosedreport": "**%s** closed Report #**%s**",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "entertoopen": "Select to display options for this player.",
- "refreshreports": "Refresh Reports",
- "refreshreportsguide": "Shows new reports in case there are any since last time the menu was opened.",
- "waitbeforeusingagain": "You must wait before using this again!",
- "invalidreport": "You need to specify a reason!",
- "claimreport":"Claim Report",
- "claimedby":"Claimed By",
- "reportalreadyclaimed": "This report has already been claimed!",
- "notification":"Notification",
- "deferral":"Checking Banlist, please wait.. (%s%%)",
- "savebanchanges":"Save Changes",
- "savebanguide":"~r~~h~NOTE:~h~~w~ Pressing Confirm will update this Ban on the Server.",
- "adminimmune":"You do not have permission to perform this action, target player is immune.",
- "teleportmeback":"Teleport me back",
- "teleportplayerback":"Teleport Player back",
- "teleportintoclosestvehicle":"into closest vehicle",
-
- "copiedtoclipboard":"Text copied to Clipboard!",
-
- "spectatevehicleseatoccupied":"The vehicle seat you were in is now occupied.",
- "spectatenovehiclefound":"The vehicle you were in can no longer be found.",
- "screenreader":"Screen Reader (TTS)",
- "screenreaderguide":"Enables Text to Speech for the GUI"
-
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/language/es.json b/server-data/resources/[esx]/EasyAdmin/language/es.json
deleted file mode 100644
index 6b9891649..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/es.json
+++ /dev/null
@@ -1,240 +0,0 @@
-[{
- "translator": "Antho#0707, Javiito32, Jenoxen#2894",
- "language": "es",
- "on": "Encendido",
- "off": "Apagado",
- "spectatingUser": "Especteando ~b~%s.",
- "stoppedSpectating": "Has parado de Espectear.",
- "hour": "Hora",
- "hours": "Horas",
- "day": "Dia",
- "days": "Dias",
- "week": "Semana",
- "weeks": "Semanas",
- "month": "Mes",
- "months": "Meses",
- "year": "Año",
- "years": "Años",
- "customtime": "Tiempo personalizado",
- "nocustombantime": "Primero tienes que definir un tiempo de Baneo!",
- "permanent": "Permanente",
- "confirm": "Confirmar",
- "playermanagement": "Gestionar Jugadores",
- "servermanagement": "Gestionar Servidor",
- "settings": "Ajustes",
- "kickplayer": "Kickear jugador",
- "banplayer": "Banear jugador",
- "reason": "Razon",
- "kickreasonguide": "Añade una razon.",
- "noreason": "No se ha especificado una razón",
- "confirmkick": "Confirmar Kickeo",
- "confirmkickguide": "~r~~h~NOTA:~h~~w~ Presionando confirmar kickearas a este jugador con la configuración especificada.",
- "banreasonguide": "Añadir una razon de baneo.",
- "banlength": "Duración de baneo",
- "banlengthguide": "¿Cuanto tiempo deseas banear al jugador?",
- "confirmban": "Confirmar baneo",
- "confirmbanguide": "~r~~h~NOTA:~h~~w~ Presionando confirmar banearas a este jugador con la configuración especificada.",
- "mute": "Mutear jugador",
- "muteguide": "~r~~h~NOTA:~h~~w~ Le prohibe el uso del chat al jugador.",
- "adminmutedplayer": "**%s** ha muteado a **%s**",
- "adminunmutedplayer": "**%s** ha desmuteado a **%s**",
- "playermuted": "ha sido muteado",
- "playerunmuted": "ha sido desmuteado",
- "playermute": "Ha sido muteado",
- "spectateplayer": "Espectear jugador",
- "teleportplayer": "Teletransportar",
- "teleporttoplayer": "hacia jugador",
- "teleportplayertome": "jugador hacia mi",
- "slapplayer": "Pegarle al jugador",
- "setplayerfrozen": "Congelar al jugador",
- "allplayers": "Todos los jugadores",
- "teleporttome": "Teleportar hacia mi",
- "teleporttomeguide": "~r~~h~NOTA:~h~~w~ Teletransportaras hacia ti a ~h~TODOS~h~ los jugadores.",
- "setgametype": "Cambiar nombre de modo de juego",
- "setgametypeguide": "~r~~h~NOTA:~h~~w~ Esto establecera el nombre del modo de juego.",
- "setmapname": "Cambia el nombre de mapa",
- "setmapnameguide": "~r~~h~NOTA:~h~~w~ Esto ajustara el nombre del mapa.",
- "startresourcebyname": "Inicia un recurso o script por nombre",
- "startresourcebynameguide": "~r~~h~NOTA:~h~~w~ Esto iniciara un recurso o script instalado en el servidor.",
- "stopresourcebyname": "Detiene un recurso o script por nombre",
- "stopresourcebynameguide": "~r~~h~NOTA:~h~~w~ Esto detendra a un recurso o script instalado en el servidor.",
- "badidea": "NO hagas eso por favor.",
- "viewbanlist": "Ver lista de baneos",
- "unbanplayer": "Desbanear jugador",
- "unbanplayerguide": "~r~~h~NOTA:~h~~w~ Presiona confirmar para desbanear al jugador.",
- "banlistshowtype": "~h~Lista de Bans:~h~ Mostrar tipo de ban",
- "unbanreasons": "Razones",
- "unbanlicenses": "Licencias",
- "banlistshowtypeguide": "Alterna entre razones de baneo o identificadores en el menú 'Desbanear jugador'.\nRequiere volver a entrar.",
- "refreshbanlist": "Actualizar lista de baneos",
- "refreshbanlistguide": "Esto actualiza la lista de baneos en el menú 'Desbanear jugador'.\nRequiere volver a entrar.",
- "refreshpermissions": "Actualizar permisos",
- "refreshpermissionsguide": "Esto actualiza sus permisos actuales.\nRequiere volver a entrar.",
- "godmodedetected": "Godmode: ~r~Detectado~w~",
- "godmodenotdetected": "Godmode: ~r~No detectado~w~",
- "antiragdoll": "~r~Anti-Ragdoll~w~",
- "health": "Vida",
- "armor": "Armadura",
- "wantedlevel": "Nivel de búsqueda",
- "exitspectator": "Presiona E para salir del modo Espectador",
-
- "allowlist": "You are not allowlisted on this server",
- "checkingallowlist": "Checking allowlist..",
- "bannedjoin": "Has sido baneado del servidor, \nRazon: %s, Expira: %s, Ban ID: %s",
- "kicked": "Has sido kickeado por %s, Razon: %s",
- "banned": "Has sido baneado del servidor, Razon: %s, Expira: %s",
- "reasonadd": " ( El jugador: %s ), ha sido baneado por: %s",
- "nongiven": "No se ha proporcionado",
- "announcement": "Anuncio",
- "announcementguide": "Send an announcement to all players",
- "adminannouncement": "**%s** sent an announcement: **%s**",
- "playernotfound": "No se ha encontrado al jugador.",
- "done": "Hecho",
- "adminkickedplayer": "**%s** a kickeado a **%s**, Razon: %s",
- "adminbannedplayer": "**%s** a baneado a **%s**, Razon: %s, Expira: %s, ID: %s",
- "adminunbannedplayer": "**%s** a desbaneado a **%s** [ %s ]",
- "adminslappedplayer": "**%s** le ha pegado a **%s** por **%s HP**",
-
- "adminfrozeplayer": "**%s** a congelado a **%s**.",
- "adminunfrozeplayer": "**%s** a descongelado a **%s**.",
-
- "left": "Izquierda",
- "middle": "Central",
- "right": "Derecha",
- "menuOrientation": "Posicion del menu",
- "menuOrientationguide": "Ajusta la posición del menu ( Izquierda, Derecha o Central ) \nRequiere reiniciar el juego.",
- "menuOffset": "Desplazamiento del menu",
- "menuOffsetguide": "Establecer tamaño del menu\nRequiere reabrir el menú.",
- "resetmenuOffset": "Reestablecer tamaño del menu",
- "takescreenshot": "Sacar una captura",
- "admintookscreenshot": "**%s** saco una captura de pantalla de **%s**'s Pantalla: %s",
- "screenshotinprogress": "una captura de pantalla ya esta en progreso, por favor espere",
- "screenshotlink": "La captura de pantalla estara disponible aqui: %s",
- "anonymous": "Admin anonimo",
- "anonymousguide": "Oculta su nombre cuando usa las funciones de EasyAdmin.",
- "adminofflinebannedplayer": "**%s** baneado desconectado **%s**, Razon: %s, Expira: %s",
- "cachedplayers": "Jugadores en cache",
- "refreshcachedplayers": "Actualizar jugadores en cache",
- "refreshcachedplayersguide": "Refresca la lista de jugadores en cache, Requiere volver a entrar.",
- "adminrequestedofflineinfo": "**%s** datos solicitados del usuario sin conexion **%s**",
- "nextpage": "Siguiente pagina»",
- "firstpage": "««Primera pagina",
- "lastpage": "Ultima pagina»»",
- "previouspage": "«Pagina anterior",
- "playercalledforadmin": "Usuario %s pide un administrador\nRazon: %s\nID: %s\n",
- "playerreportedplayer": "Usuario %s reporto a un jugador\n%s, Razon: %s\nReporta %s/%s\nID: %s\n",
- "successfullyreported": "Se ha reportado correctamente",
- "reportbantext": "Reportado por %s jugadores en poco tiempo.",
- "alreadyreported": "Ya has reportado a este jugador",
- "reportedusageerror": "Error, Usa: /report nombre razon",
- "admincalled": "Se ha llamado a un administrador exitosamente",
- "spectatedplayer": "**%s** ha especteado **%s**",
- "teleportedtoplayer": "**%s** se ha teletransportado a **%s**",
- "searchbans": "Busqueda de baneos",
- "searchbansfail": "No se ha encontrado ningun baneo con los criterios de busqueda.",
- "identifier": "Identificador %s",
- "warnplayer": "Advertir al jugador",
- "warnreasonguide": "Añade un motivo a la advertencia.",
- "confirmwarn": "Confirmar Advertencia",
- "confirmwarnguide": "~r~~h~NOTA:~h~~w~ Al pulsar Confirmar, se advertirá a este usuario con los ajustes especificados.",
- "warnedtitle": "Advertencia",
- "warnedby": "advertido por",
- "warndismiss": "Mantén la Barra Espaciadora durante 10 segundos para cancelar.",
- "warned": "Has recibido una advertencia, Razon: %s, Aviso: %s/%s",
- "warnkicked": "Has sido kickeado por recibir demasiadas advertencias.",
- "warnbanned": "Has sido baneado por recibir demasiadas advertencias.",
- "adminwarnedplayer": "**%s** advirtio a **%s**, Razón: %s, Advertencia %s/%s",
-
- "searchuser": "Buscar usuario",
- "searchuserguide": "Encuentra un jugador usando su nombre de usuario o ID",
-
- "setconvar": "Definir Convar",
- "setconvarguide": "~r~NOTA: NO TOQUES ESTO si no sabes lo que haces ~w~\nCambia una Convar",
- "adminchangedconvar": "**%s** ha cambiado la convar **%s** a **%s**",
- "adminstartedresource": "**%s** ha iniciado el script **%s**",
- "adminstoppedresource": "**%s** ha detenido el script **%s**",
-
- "convarname": "Nombre de Convar",
- "convarvalue": "Valor de Convar",
-
- "cleanarea": "Limpiar Area",
- "cleanareaguide": "Limpia el area de las entidades seleccionadas",
- "cars": "Vehículos",
- "peds": "Peatones",
- "props": "Objetos",
- "cleaningcar": "Borrando Vehículos %s",
- "cleaningped": "Borrando Peatones %s",
- "cleaningprop": "Borrando Objetos %s",
- "finishedcleaning": "Limpieza completada con exito %s",
- "admincleanedup": "**%s** Ha realizado una limpieza de todos los **%s** en un radio de **%s**.",
- "radius": "Radio",
- "type": "Tipo",
- "deepclean":"Limpieza Profunda",
- "deepcleanguide":"También borra las entidades del cliente.",
-
- "forceeasteregg": "Forzar Easter Egg",
-
- "permissioneditor": "Editor de permisos",
- "permissioneditorguide": "Edita los permisos del servidor, se guardan en ~g~easyadmin_permissions.cfg~w~",
-
- "aces": "ACEs",
- "permission": "Permisos",
- "principals": "Principal",
- "addace": "~g~Añadir ACE",
- "addaceguide": "Puedes editar esto antes de guardar.",
- "addprincipal": "~g~Añadir Principal",
- "group": "Grupo",
- "entergroup": "Introduce un nombre de grupo (ej. group.admin)",
- "enterperm": "Introduce nombre de permiso (ej. easyadmin.player.kick)",
- "state": "Estado",
- "stateguide": "La denegacion de permisos no funciona correctamente, Solo dale permisos que quieras que el jugador tenga.",
- "location": "Ubicacion",
- "locationguide": "Este valor no se puede editar.",
- "principal": "Principal",
- "enterprincipal": "Añadir principal (ej. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Borrar Permisos",
- "deletepermissionguide": "~r~CUIDADO, Esto le borrara el permiso a este jugador",
- "deleteprincipal": "~r~Borrar Principal",
- "deleteprincipalguide": "~r~CUIDADO, Esto le borrará el permiso a este jugador",
-
- "itemdeleted": "~r~Item borrado.",
- "savechanges": "~g~Guardar cambios",
- "savechangesguide": "~r~CUIDADO ~w~ Esto no se puede restaurar",
- "admineditedpermissions": "**%s** ha editado los permisos del servidor.",
-
- "reportviewer": "Reportes activos",
- "call": "Llamada de Admin",
- "report": "Reporte de Admin",
- "open": "Abrir",
- "reporter": "Jugador que Reporta",
- "reported": "Jugador Reportado",
- "closereport": "Cerrar Reporte",
- "closesimilarreports": "~r~Cerrar todos los reportes similares~w~",
- "closesimilarreportsguide": "Intentara encontrar y borrar todos los reportes realizados por el mismo usuario.",
- "adminclosedreport": "**%s** ha cerrado el reporte #**%s**",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "entertoopen": "Selecciona para revisar las opciones para este jugador.",
- "refreshreports": "Refrescar Reportes",
- "refreshreportsguide": "Muestra nuevos reportes desde la última vez que se haya abierto el menu.",
- "waitbeforeusingagain": "¡Debes esperar antes de poder hacer eso otra vez!",
- "invalidreport": "¡Tienes que especificar un motivo!",
- "claimreport":"Aceptar reporte",
- "claimedby":"Reporte atendido por",
- "reportalreadyclaimed": "Este reporte ya ha sido aceptado",
- "notification":"Notificacion",
- "deferral":"Comprobando lista de baneos, por favor espere... (%s%%)",
- "savebanchanges":"Guardar Cambios",
- "savebanguide":"~r~~h~NOTA:~h~~w~ Pulsando Confirmar actualizaras este Baneo en el servidor.",
- "adminimmune":"No tienes permiso para hacer esto, el jugador que has seleccionado es Administrador.",
- "teleportmeback":"Teletransportarme a donde estaba",
- "teleportplayerback":"Teletransportar al jugador a donde estaba",
- "teleportintoclosestvehicle":"Al vehiculo mas cercano",
-
- "copiedtoclipboard":"Texto copiado al portapapeles",
-
- "spectatevehicleseatoccupied":"El asiento en el vehiculo en el que estabas se encuentra ocupado.",
- "spectatenovehiclefound":"El vehiculo en el que estabas ya no puede ser encontrado.",
- "screenreader":"Texto a Voz (TTS)",
- "screenreaderguide":"Activa el Texto a Voz de la interfaz (GUI)"
-
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/language/fr.json b/server-data/resources/[esx]/EasyAdmin/language/fr.json
deleted file mode 100644
index 347054205..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/fr.json
+++ /dev/null
@@ -1,243 +0,0 @@
-[{
- "translator": "Feared, Robi321",
- "language": "fr",
- "on": "Activer",
- "off": "Éteins",
-
- "spectatingUser": "Vous regardez ~b~%s.",
- "stoppedSpectating": "Vous avez arrêté de regarder un joueur.",
- "hour": "Heure",
- "hours": "Les heures",
- "day": "Jour",
- "days": "Jours",
- "week": "La semaine",
- "weeks": "Semaines",
- "month": "Mois",
- "months": "Mois",
- "year": "An",
- "years": "Ans",
- "customtime": "Heure personnalisée",
- "nocustombantime": "Vous devez d'abord définir une durée d'interdiction personnalisée !",
- "permanent": "Permanent",
- "confirm": "Confirmer",
- "playermanagement": "Gestion des joueurs",
- "servermanagement": "Gestion du serveur",
- "settings": "Paramètres",
- "kickplayer": "Expulser le joueur",
- "banplayer": "Bannir le joueur",
- "reason": "Raison",
- "kickreasonguide": "Ajouter une raison pour le kick.",
- "noreason": "Aucune raison spécifiée",
- "confirmkick": "Confirmer le kick",
- "confirmkickguide": "~r~~h~NOTE :~h~~w~ Appuyer sur confirmer va ~r~~h~expulser~h~~w~ le joueur avec les paramètres spécifiés.",
- "banreasonguide": "Ajouter une raison pour le bannissement.",
- "banlength": "Temps du bannissement",
- "banlengthguide": "Jusqu'à quand le joueur doit être banni?",
- "confirmban": "Confirmer le bannissement",
- "mute": "Joueur muet",
- "muteguide": "~r~~h~NOTE:~h~~w~ Cela empêchera le joueur d’utiliser le chat textuel.",
- "adminmutedplayer": "**%s** muted **%s**",
- "adminunmutedplayer": "**%s** unmuted **%s**",
- "playermuted": "a été mis en sourdine!",
- "playerunmuted": "a été mis en sans sourdine!",
- "playermute": "Vous êtes muet!",
- "confirmbanguide": "~r~~h~NOTE:~h~~w~ Appuyer sur confirmer va ~r~~h~bannir~h~~w~ le joueur avec les paramètres specifiés.",
- "spectateplayer": "Regarder le joueur",
- "teleportplayer": "Téléportation",
- "teleporttoplayer": "au joueur",
- "teleportplayertome": "du joueur à moi",
- "slapplayer": "Pousser le joueur",
- "setplayerfrozen": "Geler le joueur",
- "allplayers": "Tout les joueurs",
- "teleporttome": "Téléporter à moi",
- "teleporttomeguide": "~r~~h~NOTE :~h~~w~ Cela va téléporter ~r~~h~tout~h~~w~ les joueurs à vous.",
- "setgametype": "Changer le type de jeu",
- "setgametypeguide": "~r~~h~NOTE:~h~~w~ Cela va changer de type de jeu dans la liste des serveurs.",
- "setmapname": "Changer de carte",
- "setmapnameguide": "~r~~h~NOTE :~h~~w~ Cela va changer de carte dans la liste des serveurs.",
- "startresourcebyname": "Lancer la ressource par son nom",
- "startresourcebynameguide": "~r~~h~NOTE :~h~~w~ Cela va lancer une ressource sur votre serveur.",
- "stopresourcebyname": "Arrêter la ressource par son nom",
- "stopresourcebynameguide": "~r~~h~NOTE :~h~~w~ Cela va arrêter une ressource sur votre serveur.",
- "badidea": "Ne faites pas cela, s'il vous plaît.",
- "viewbanlist": "Voir la liste d'interdiction",
- "unbanplayer": "Débannir un joueur",
- "unbanplayerguide": "~r~~h~NOTE :~h~~w~ Confirmer le débannissement du joueur.",
- "banlistshowtype": "~h~Liste des bans :~h~ voir le type",
- "unbanreasons": "Raison",
- "unbanlicenses": "ID",
- "banlistshowtypeguide": "Choisir l'affichage dans le menu 'Débannir joueur'.\nRéouverture requise.",
- "refreshbanlist": "Rafraîchir la liste des bans",
- "refreshbanlistguide": "Rafraîchir votre liste des bans au menu 'Débannir joueur'. Réouverture requise.",
- "refreshpermissions": "Rafraîchir les permissions",
- "refreshpermissionsguide": "Rafraîchir vos permissions sur le serveur actuel.\nRéouverture requise.",
- "godmodedetected": "Invincibilité : ~r~Détecté~w~",
- "godmodenotdetected": "Invincibilité : ~g~Non détecté~w~",
- "antiragdoll": "~r~Anti-Gamelle~w~",
- "health": "Vie",
- "armor": "Armure",
- "wantedlevel": "Niveau de recherche",
- "exitspectator": "Appuyer sur E pour quitter le mode spectateur",
-
- "allowlist": "You are not allowlisted on this server",
- "checkingallowlist": "Checking allowlist..",
- "bannedjoin": "Vous avez été banni du serveur, \nRaison : %s, Expiration du bannissement : %s, Ban ID: %s",
- "kicked": "Éjecté par %s, Raison : %s",
- "banned": "Vous avez été banni du serveur, \nRaison : %s, Expiration du bannissement : %s",
- "reasonadd": " ( Pseudo : %s ), banni par : %s",
- "nongiven": "Non autorisé",
- "announcement": "Announcement",
- "announcementguide": "Send an announcement to all players",
- "adminannouncement": "**%s** sent an announcement: **%s**",
- "playernotfound": "Le joueur n'a pas été trouvé.",
- "done": "Fait!",
- "adminkickedplayer": "**%s** a expulser **%s**, Raison: %s",
- "adminbannedplayer": "**%s** a banni **%s**, Raison: %s, Expire: %s, ID: %s",
- "adminunbannedplayer": "**%s** a débanni **%s** [ %s ]",
- "adminslappedplayer": "**%s** à pousser **%s** pour **%s HP**",
-
- "adminfrozeplayer": "**%s** à geler **%s**.",
- "adminunfrozeplayer": "**%s** à dégeler **%s**.",
-
- "left": "Gauche",
- "middle": "Milieu",
- "right": "Droite",
- "menuOrientation": "Orientation du menu",
- "menuOrientationguide": "Réglage de l'orientation du menu ( Gauche, milieu ou droite ) \nNécessite un redémarrage du jeu.",
- "menuOffset": "Définir la largeur du menu",
- "menuOffsetguide": "Définir la taille du menu\nNécessite la réouverture du menu.",
- "resetmenuOffset": "Réinitialiser la largeur du menu",
- "takescreenshot": "Faire une capture d'écran",
- "admintookscreenshot": "**%s** a fait une capture d'écran de l'écran de **%s** : %s",
- "screenshotinprogress": "Une capture d'écran est déjà en cours, veuillez patienter !",
- "screenshotlink": "La capture d'écran est disponible ici : %s",
- "anonymous": "Administration anonyme",
- "anonymousguide": "Masque votre nom lorsque vous utilisez les fonctions EasyAdmin.",
- "adminofflinebannedplayer": "**%s** offline banned **%s**, Reason: %s, Ban Expires: %s",
- "cachedplayers": "Joueurs en cache",
- "refreshcachedplayers": "Rafraîchir les joueurs en cache",
- "refreshcachedplayersguide": "Refreshes List of Cached Players, requires reopening.",
- "adminrequestedofflineinfo": "**%s** Données demandées à l'utilisateur de l'utilisateur hors ligne **%s**",
- "nextpage": "Page suivante»",
- "firstpage": "««Première page",
- "lastpage": "Dernière page»»",
- "previouspage": "«Page précédente",
- "playercalledforadmin": "Utilisateur %s appelle un administrateur!\nRaison: %s\nID: %s\n",
- "playerreportedplayer": "Utilisateur %s a signalé un joueur!\n%s, Raison: %s\nReportage %s/%s\nID: %s\n",
- "successfullyreported": "A signalé le joueur avec succès!",
- "reportbantext": "Rapporté par %s Joueurs en peu de temps.",
- "alreadyreported": "Vous avez déjà signalé ce joueur!",
- "reportedusageerror": "Erreur! Usage: /report nom raison",
- "admincalled": "Appelé avec succès un administrateur!",
-
- "spectatedplayer": "**%s** a regardé **%s**",
- "teleportedtoplayer": "**%s** téléporté vers **%s**",
- "searchbans": "Interdictions de recherche",
- "searchbansfail": "Aucune interdiction avec les critères de recherche n'a été trouvée.",
- "identifier": "Identifier %s",
- "warnplayer": "Avertir le joueur",
- "warnreasonguide": "Ajouter une raison à l'avertissement.",
- "confirmwarn": "Confirmer Avertir",
- "confirmwarnguide": "~r~~h~NOTE:~h~~w~ Appuyer sur Confirmer avertira ce lecteur avec les paramètres spécifiés.",
- "warned": "Vous avez été averti, Raison : %s, Avertissement %s/%s",
- "warnedtitle": "Avertissement",
- "warnedby": "averti par",
- "warndismiss": "Maintenez la barre d'espacement pendant 10 secondes pour fermer.",
- "warnkicked": "Vous avez reçu un coup de pied parce que vous avez été averti trop souvent.",
- "warnbanned": "Averti trop souvent.",
- "adminwarnedplayer": "**%s** averti **%s**, Raison : %s, Avertissement %s/%s",
-
- "searchuser": "Rechercher un utilisateur",
- "searchuserguide": "Trouver un joueur à l'aide de son nom d'utilisateur ou de son identifiant",
-
- "setconvar": "Set Convar",
- "setconvarguide": "~r~NOTE: Si vous ne savez pas ce que vous faites, n'y touchez pas!~w~\nModifications apportées à Convar",
- "adminchangedconvar": "**%s** changed convar **%s** to **%s**",
- "adminstartedresource": "**%s** started resource **%s**",
- "adminstoppedresource": "**%s** stopped resource **%s**",
-
- "convarname": "Convar Nom",
- "convarvalue": "Convar Valeur",
-
- "cleanarea": "Zone de nettoyage",
- "cleanareaguide": "Nettoie toutes les entités à proximité du type sélectionné",
- "cars": "Voitures",
- "peds": "Péd",
- "props": "Accessoires",
- "cleaningcar": "Suppression d'un véhicule %s",
- "cleaningped": "Suppression Ped %s",
- "cleaningprop": "Suppression d'un objet %s",
- "finishedcleaning": "Nettoyage terminé %s",
- "admincleanedup": "**%s** Nettoyé tous les **%s** dans un rayon de **%s**.",
- "radius": "Radius",
- "type": "Type",
- "deepclean":"Deep Clean",
- "deepcleanguide":"Also deletes clientside entities.",
-
- "forceeasteregg": "Forcer Easter Egg",
-
- "permissioneditor": "Permission Editor",
- "permissioneditorguide": "Modifier les autorisations sur le serveur, enregistre dans ~g~easyadmin_permissions.cfg~w~",
-
- "aces": "ACEs",
- "permission": "Autorisation",
- "principals": "Principals",
- "addace": "~g~Ajouter ACE",
- "addaceguide": "Vous avez la possibilité de le modifier avant d'enregistrer.",
- "addprincipal": "~g~Ajouter Principal",
- "group": "Grouper",
- "entergroup": "Entrez le nom du groupe (e.g. group.admin)",
- "enterperm": "Entrez le nom de l'autorisation (e.g. easyadmin.player.kick)",
- "state": "État",
- "stateguide": "Refuser les autorisations ne fonctionne pas correctement, n'autorisez que les autorisations que vous souhaitez que le joueur ait.",
- "location": "Emplacement",
- "locationguide": "Cette valeur ne peut pas être modifiée.",
- "principal": "Principal",
- "enterprincipal": "Entrer principal (e.g. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Supprimer l'autorisation",
- "deletepermissionguide": "~r~Avertissement! Cela révoquera et supprimera complètement l'autorisation!",
- "deleteprincipal": "~r~Supprimer Principal",
- "deleteprincipalguide": "~r~Avertissement! Cela révoquera et supprimera complètement le principal!",
-
- "itemdeleted": "~r~Cet élément a été supprimé.",
- "savechanges": "~g~Sauvegarder les modifications",
- "savechangesguide": "~r~Avertissement! ~w~Ça ne peut pas être annulé!",
- "admineditedpermissions": "**%s** modifié les autorisations du serveur.",
-
- "reportviewer": "Visionneuse de rapports",
- "call": "Appeler",
- "report": "Reportage",
- "open": "Ouvert",
- "reporter": "Reporter",
- "reported": "Signalé",
- "closereport": "Fermer le rapport",
- "closesimilarreports": "~r~Fermer tous les rapports similaires~w~",
- "closesimilarreportsguide": "Tentera de trouver et de supprimer les rapports créés par le même utilisateur.",
- "adminclosedreport": "**%s** Rapport fermé #**%s**",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "entertoopen": "Sélectionnez pour afficher les options pour ce lecteur.",
- "refreshreports": "Actualiser les rapports",
- "refreshreportsguide": "Affiche de nouveaux rapports au cas où il y en aurait depuis la dernière fois que le menu a été ouvert.",
- "waitbeforeusingagain": "Vous devez attendre avant de l'utiliser à nouveau!",
- "invalidreport": "Vous devez spécifier une raison!",
- "claimreport":"Rapport de réclamation",
- "claimedby":"Revendiquée par",
- "reportalreadyclaimed": "Ce rapport a déjà été réclamé!",
- "notification":"Notification",
- "deferral":"Vérification de la liste de bannissement, veuillez patienter.. (%s%%)",
- "savebanchanges":"Sauvegarder les modifications",
- "savebanguide":"~r~~h~NOTE:~h~~w~ Appuyez sur Confirmer pour mettre à jour cette interdiction sur le serveur.",
- "adminimmune":"Vous n'avez pas la permission d'effectuer cette action, le joueur ciblé est immunisé.",
- "teleportmeback":"Téléporter moi dos",
- "teleportplayerback":"Téléporter le joueur dos",
- "teleportintoclosestvehicle":"into closest vehicle",
-
- "copiedtoclipboard":"Texte copié dans le presse-papiers!",
-
- "spectatevehicleseatoccupied":"Le siège du véhicule dans lequel vous étiez est maintenant occupé.",
- "spectatenovehiclefound":"Le véhicule dans lequel vous étiez est introuvable.",
- "screenreader":"Screen Reader (TTS)",
- "screenreaderguide":"Enables Text to Speech for the GUI"
-
-
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/language/it.json b/server-data/resources/[esx]/EasyAdmin/language/it.json
deleted file mode 100644
index ff1426bc1..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/it.json
+++ /dev/null
@@ -1,242 +0,0 @@
-[{
- "translator": "IceHax, ITKewai",
- "language": "it",
- "on": "Attivo",
- "off": "Disattivo",
- "spectatingUser": "Spectando ~b~%s.",
- "stoppedSpectating": "Non Stai Più Spectando.",
- "hour": "Hour",
- "hours": "Hours",
- "day": "Day",
- "days": "Days",
- "week": "Week",
- "weeks": "Weeks",
- "month": "Month",
- "months": "Months",
- "year": "Year",
- "years": "Years",
- "customtime": "Custom Time",
- "nocustombantime": "You need to set a custom ban length first!",
- "permanent": "Permanente",
- "confirm": "Confirm",
- "playermanagement": "Gestione Giocatori",
- "servermanagement": "Gestione Server",
- "settings": "Impostazioni",
- "kickplayer": "Espelli Giocatore",
- "banplayer": "Bandisci Giocatore",
- "reason": "Ragione",
- "kickreasonguide": "Aggiungi una ragione per l'espulsione",
- "noreason": "Nessuna Ragione Specificata",
- "confirmkick": "Conferma espulsione",
- "confirmkickguide": "~r~~h~NOTA:~h~~w~ Premendo Conferma si espellera il giocatore con le impostazioni correnti.",
- "banreasonguide": "Aggiugi una ragione per il Ban.",
- "banlength": "Durata del Ban",
- "banlengthguide": "Fino a quando dovrà essere bandito il giocatore?",
- "confirmban": "Conferma il Ban",
- "confirmbanguide": "~r~~h~NOTA:~h~~w~ Premendo conferma bandirai il giocatore con le impostazioni correnti.",
- "mute": "Muta il Giocatore",
- "muteguide": "~r~~h~ATTENZIONE:~h~~w~ Ciò impedirà al giocatore di utilizzare la chat di testo.",
- "adminmutedplayer": "**%s** ha mutato **%s**",
- "adminunmutedplayer": "**%s** ha smutato **%s**",
- "playermuted": "è stato mutato!",
- "playerunmuted": "è stato smutato!",
- "playermute": "Sei mutato!",
- "spectateplayer": "Spetta Giocatore",
- "teleportplayer": "Teletrasporta",
- "teleporttoplayer": "Te dal Giocatore",
- "teleportplayertome": "il Giocatore da Me",
- "slapplayer": "Schiaffeggia il Giocatore",
- "setplayerfrozen": "Blocca Il Giocatore",
- "allplayers": "Tutti i Giocatori",
- "teleporttome": "Teletrasporta tutti",
- "teleporttomeguide": "~r~~h~NOTA:~h~~w~ Questo Teletrasporterà ~h~TUTTI~h~ i giocatori da te.",
- "setgametype": "Imposta Game Type",
- "setgametypeguide": "~r~~h~NOTA:~h~~w~ Questo imposterà il Game Type mostrato nella ServerList.",
- "setmapname": "Imposta Map Name",
- "setmapnameguide": "~r~~h~NOTA:~h~~w~ Questo modificherà La Map Name, mostrata nella ServerList.",
- "startresourcebyname": "Esegui Risorsa per nome",
- "startresourcebynameguide": "~r~~h~NOTA:~h~~w~ Questo Starterà una Risorsa installata sul server.",
- "stopresourcebyname": "Ferma Risorsa per nome",
- "stopresourcebynameguide": "~r~~h~NOTA:~h~~w~ Questo Stopperà una Risorsa installata sul server.",
- "badidea": "Non farlo, per piacere.",
- "viewbanlist": "Visualizza Banlist",
- "unbanplayer": "Rimuovi ban per il giocatore",
- "unbanplayerguide": "~r~~h~NOTA:~h~~w~ Premendo Conferma Rimuoverai il Ban di questo giocatore.",
- "banlistshowtype": "~h~Banlist:~h~ Mostra tipo",
- "unbanreasons": "Ragioni",
- "unbanlicenses": "Licenze",
- "banlistshowtypeguide": "Cambia tra Identificatore e Ragioni per il ban Nel menù 'Rimuovi Ban per il giocatore'.\nRichiede una riapertura del menù.",
- "refreshbanlist": "Aggiorna La lista dei ban",
- "refreshbanlistguide": "Questo aggiorna la lista dei ban per il menù 'Rimuovi ban per il giocatore'.\nRichiede una riapertura del menù.",
- "refreshpermissions": "Aggiorna Permessi",
- "refreshpermissionsguide": "Questo aggiorna i tuoi permessi correnti.\nRichiede una riapertura del menù.",
- "godmodedetected": "Godmode: ~r~Trovata~w~",
- "godmodenotdetected": "Godmode: ~g~Non Trovata~w~",
- "antiragdoll": "~r~Anti-Ragdoll~w~",
- "health": "Salute",
- "armor": "Armatura",
- "wantedlevel": "Livello Ricercato",
- "exitspectator": "Premi E per uscire dalla modalità spettatore.",
-
- "allowlist": "You are not allowlisted on this server",
- "checkingallowlist": "Checking allowlist..",
- "bannedjoin": "Sei stato bandito da questo server, \nMotivo: %s, Il Ban Scade: %s, Ban ID: %s",
- "kicked": "Espulso da %s, Motivo: %s",
- "banned": "Sei stato bandito da questo server, Motivo: %s, Il Ban Scade: %s",
- "reasonadd": " ( Nickname: %s ), Bandito da: %s",
- "nongiven": "Non fornito",
- "announcement": "Announcement",
- "announcementguide": "Send an announcement to all players",
- "adminannouncement": "**%s** sent an announcement: **%s**",
- "playernotfound": "Giocatore non trovato.",
- "done": "Fatto!",
- "adminkickedplayer": "**%s** Ha espulso **%s**, Motivo: %s",
- "adminbannedplayer": "**%s** Ha bandito **%s**, Motivo: %s, Scadenza: %s, ID: %s",
- "adminunbannedplayer": "**%s** ha revocato il ban di **%s** [ %s ]",
- "adminslappedplayer": "**%s** ha schiaffeggiato **%s** togliendogli **%s HP**",
-
- "adminfrozeplayer": "**%s** ha bloccato **%s**.",
- "adminunfrozeplayer": "**%s** ha sbloccato **%s**.",
-
- "left": "Sinistra",
- "middle": "Centrale",
- "right": "Destra",
- "menuOrientation": "Orientamento del menù",
- "menuOrientationguide": "Imposta l'orientamento del menù ( Sinistra, Destra o Centro ) \nRichiede la riapertura del menù.",
- "menuOffset": "Larghezza del menù",
- "menuOffsetguide": "Imposta l'offset della dimensione del menù\nRichiede la riapertura del menù.",
- "resetmenuOffset": "Resetta larghezza del menù",
- "takescreenshot": "Prendi uno Screenshot",
- "admintookscreenshot": "**%s** ha preso uno Screenshot dallo schermo di **%s** : %s",
- "screenshotinprogress": "si sta già catturando lo Screenshot, attendi!",
- "screenshotlink": "Lo screenshot è disponibile qui: %s",
- "anonymous": "Admin anonimo",
- "anonymousguide": "Nasconde il tuo nome quando usi le funzioni dell' EasyAdmin.",
- "adminofflinebannedplayer": "**%s** ha bannato offline **%s**, Motivo: %s, Scadenza del Ban: %s",
- "cachedplayers": "Giocatori nella Cache",
- "refreshcachedplayers": "Aggiorna giocatori nella Cache",
- "refreshcachedplayersguide": "Aggiornare giocatori nella Cache, Richiede la riapertura del menù.",
- "adminrequestedofflineinfo": "**%s** ha richiesto i Dati Offline di **%s**",
- "nextpage": "Pagina Sucessiva»",
- "firstpage": "««Prima Pagina",
- "lastpage": "Ultima Pagina»»",
- "previouspage": "«Pagina Precedente",
- "playercalledforadmin": "L'utente %s sta chiamando un admin!\nMotivo: %s\nID: %s\n",
- "playerreportedplayer": "L'utente %s sta segnalando un giocatore!\n%s, Motivo: %s\nSegnalazione %s/%s\nID: %s\n",
- "successfullyreported": "Player segnalato con successo!",
- "reportbantext": "Sei stato segnalato da %s giocatori in breve periodo.",
- "alreadyreported": "Hai già segnalato questo player!",
- "reportedusageerror": "Errore! Esempio di utilizzo : /report nome motivo",
- "admincalled": "Admin contattato correttamente!",
-
- "spectatedplayer": "**%s** sta guardando **%s**",
- "teleportedtoplayer": "**%s** teletrasportato a **%s**",
- "searchbans": "Cerca Ban",
- "searchbansfail": "Non è stato trovato nessun Ban con questo criterio di ricerca.",
- "identifier": "Identificatore %s",
- "warnplayer": "Warna un giocatore",
- "warnreasonguide": "Aggiungi il motivo dell' Warn.",
- "confirmwarn": "Conferma Warn",
- "confirmwarnguide": "~r~~h~ATTENZIONE:~h~~w~ Premendo conferma si Warnerà questo giocatore con le impostazioni attuali.",
- "warnedtitle": "Attenzione",
- "warnedby": "warnato da",
- "warndismiss": "Tieni premuto spazio per 10 Secondi per chiudere questa schermata.",
- "warned": "Sei stato warnato, Motivo: %s, Warn %s di %s",
- "warnkicked": "Sei stato espulso per aver preso troppi Warn. Rientra",
- "warnbanned": "Warnato troppe volte.",
- "adminwarnedplayer": "**%s** ha warnato **%s**, Motivo: %s, Warn %s di %s",
-
- "searchuser": "Cerca utente ",
- "searchuserguide": "Trova un giocatore utilizzando il suo nome utente o ID",
-
- "setconvar": "Set Convar",
- "setconvarguide": "~r~ATTENZIONE: Se non sai cosa stai facendo, non modificare niente!~w~\nChanges a Convar",
- "adminchangedconvar": "**%s** changed convar **%s** to **%s**",
- "adminstartedresource": "**%s** ha avviato la Risorsa **%s**",
- "adminstoppedresource": "**%s** ha fermato la Risorsa **%s**",
-
- "convarname": "Convar Name",
- "convarvalue": "Convar Value",
-
- "cleanarea": "Pulisci l'Area",
- "cleanareaguide": "Cleans up all nearby entities of selected type",
- "cars": "Veicoli",
- "peds": "Ped",
- "props": "Oggetti",
- "cleaningcar": "Cancellando Veicoli %s",
- "cleaningped": "Cancellando Ped %s",
- "cleaningprop": "Cancellando Oggetti %s",
- "finishedcleaning": "%s cancellatti correttamente",
- "admincleanedup": "**%s** Ripulito tutto **%s** in un raggio **%s**.",
- "radius": "Radius",
- "type": "Type",
- "deepclean":"Deep Clean",
- "deepcleanguide":"Also deletes clientside entities.",
-
- "forceeasteregg": "Force Easter Egg",
-
- "permissioneditor": "Editor permessi",
- "permissioneditorguide": "Modifica i permessi nel server, e li salva in ~g~easyadmin_permissions.cfg~w~",
-
- "aces": "ACEs",
- "permission": "Permission",
- "principals": "Principals",
- "addace": "~g~Add ACE",
- "addaceguide": "Puoi modificare questo file prima di salvarlo.",
- "addprincipal": "~g~Add Principal",
- "group": "Group",
- "entergroup": "Enter group name (e.g. group.admin)",
- "enterperm": "Enter Permission name (e.g. easyadmin.player.kick)",
- "state": "State",
- "stateguide": "Denying permissions does not work properly, only allow permissions you want the player to have.",
- "location": "Location",
- "locationguide": "This value cannot be edited.",
- "principal": "Principal",
- "enterprincipal": "Enter principal (e.g. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Delete Permission",
- "deletepermissionguide": "~r~Warning! This will completely revoke and delete the Permission!",
- "deleteprincipal": "~r~Delete Principal",
- "deleteprincipalguide": "~r~Warning! This will completely revoke and delete the Principal!",
-
- "itemdeleted": "~r~This Item has been deleted.",
- "savechanges": "~g~Salve Modifiche",
- "savechangesguide": "~r~Attenzione! ~w~Non può essere fatto!",
- "admineditedpermissions": "**%s** ha modificato i permessi del server.",
-
- "reportviewer": "Lista Segnalazioni",
- "call": "Call",
- "report": "Segnalazioni",
- "open": "Apri",
- "reporter": "Utente Segnalatore",
- "reported": "Utente Segnalato",
- "closereport": "Chiudi segnalazione",
- "closesimilarreports": "~r~Chiudi le segnalazioni simili~w~",
- "closesimilarreportsguide": "Prova a cercare e cancellare segnalazioni fatte dallo stesso utente.",
- "adminclosedreport": "**%s** ha chiuso il report #**%s**",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "entertoopen": "Seleziona per vedere opzioni per questo giocatore.",
- "refreshreports": "Aggiorna Segnalazioni",
- "refreshreportsguide": "Mostra le nuove segnalazioni rispetto all'ultima volta che hai aperto il menù.",
- "waitbeforeusingagain": "You must wait before using this again!",
- "invalidreport": "You need to specify a reason!",
- "claimreport":"Claim Report",
- "claimedby":"Claimed By",
- "reportalreadyclaimed": "This report has already been claimed!",
- "notification":"Notification",
- "deferral":"Checking Banlist, please wait.. (%s%%)",
- "savebanchanges":"Save Changes",
- "savebanguide":"~r~~h~NOTE:~h~~w~ Pressing Confirm will update this Ban on the Server.",
- "adminimmune":"You do not have permission to perform this action, target player is immune.",
- "teleportmeback":"Teleport me back",
- "teleportplayerback":"Teleport Player back",
- "teleportintoclosestvehicle":"into closest vehicle",
-
- "copiedtoclipboard":"Text copied to Clipboard!",
-
- "spectatevehicleseatoccupied":"The vehicle seat you were in is now occupied.",
- "spectatenovehiclefound":"The vehicle you were in can no longer be found.",
- "screenreader":"Screen Reader (TTS)",
- "screenreaderguide":"Enables Text to Speech for the GUI"
-
-
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/language/nl.json b/server-data/resources/[esx]/EasyAdmin/language/nl.json
deleted file mode 100644
index d187605ff..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/nl.json
+++ /dev/null
@@ -1,242 +0,0 @@
-[{
- "translator": "TheIndra, Jaccosf",
- "language": "nl",
-
- "on": "Ingeschakeld",
- "off": "Uitgeschakeld",
- "spectatingUser": "~b~%s aan het Spectaten.",
- "stoppedSpectating": "Gestopt met Spectaten.",
- "hour": "Uur",
- "hours": "Uren",
- "day": "Dag",
- "days": "Dagen",
- "week": "Week",
- "weeks": "Weken",
- "month": "Maand",
- "months": "Maanden",
- "year": "Jaar",
- "years": "Jaren",
- "customtime": "Custom Tijd",
- "nocustombantime": "Je moet eerst de lengte van de ban invullen!",
- "permanent": "Permanent",
- "confirm": "Bevestig",
- "playermanagement": "Speler Beheer",
- "servermanagement": "Server Management",
- "settings": "Instellingen",
- "kickplayer": "Kick Speler",
- "banplayer": "Ban Speler",
- "reason": "Reden",
- "kickreasonguide": "Voeg een reden toe aan de kick.",
- "noreason": "Geen reden opgegeven",
- "confirmkick": "Bevestig Kick",
- "confirmkickguide": "~r~~h~NOTITIE:~h~~w~ Als je op bevestigen drukt wordt deze Speler gekickt.",
- "mute": "Demp speler",
- "muteguide": "~r~~h~NOTITIE:~h~~w~ Dit voorkomt dat de speler de tekstchat gebruikt.",
- "adminmutedplayer": "**%s** muted **%s**",
- "adminunmutedplayer": "**%s** unmuted **%s**",
- "playermuted": "is gedempt!",
- "playerunmuted": "is niet-gedempt!",
- "playermute": "Je bent gedempt!",
- "banreasonguide": "Voeg een reden toe aan de ban.",
- "banlength": "Ban Lengte",
- "banlengthguide": "Hoelang moet de Speler verbannen worden?",
- "confirmban": "Bevestig Ban",
- "confirmbanguide": "~r~~h~NOTITIE:~h~~w~ Als je op bevestigen drukt wordt deze Speler verbannen.",
- "spectateplayer": "Spectate Speler",
- "teleportplayer": "Teleporteer",
- "teleporttoplayer": "naar Speler",
- "teleportplayertome": "Speler naar mij",
- "slapplayer": "Speler klap geven",
- "setplayerfrozen": "Speler vastzetten",
- "allplayers": "Alle spelers",
- "teleporttome": "Teleporteer naar mij",
- "teleporttomeguide": "~r~~h~NOTITIE:~h~~w~ Dit teleporteert ~h~alle~h~ spelers naar jou.",
- "setgametype": "Stel Game Type in",
- "setgametypeguide": "~r~~h~NOTITIE:~h~~w~ Dit stelt het game type in zoals weergegeven op de Serverlijst.",
- "setmapname": "Stel Map Naam in",
- "setmapnameguide": "~r~~h~NOTITIE:~h~~w~ Dit stelt de map naam in zoals weergegeven in de Serverlijst.",
- "startresourcebyname": "Start Resource met Naam",
- "startresourcebynameguide": "~r~~h~NOTITIE:~h~~w~ Dit zal een resource starten geinstalleerd op de server.",
- "stopresourcebyname": "Stop Resource met Naam",
- "stopresourcebynameguide": "~r~~h~NOTITIE:~h~~w~ Dit zal een resource stoppen geinstalleerd op de server.",
- "badidea": "Doe dat alsjeblieft niet.",
- "viewbanlist": "Bekijk de Banlijst",
- "unbanplayer": "Unban Speler",
- "unbanplayerguide": "~r~~h~NOTITIE:~h~~w~ Als je op bevestigen drukt wordt deze Speler zijn ban ongedaan gemaakt.",
- "banlistshowtype": "~h~Banlijst:~h~ Show Type",
- "unbanreasons": "Redenen",
- "unbanlicenses": "Licenses",
- "banlistshowtypeguide": "Wissel tussen Ban redenen of Identifiers in het 'Unban Speler' Menu.\nVereist Heropenen.",
- "refreshbanlist": "Herlaad Banlijst",
- "refreshbanlistguide": "Dit herlaad de Banlijst in het 'Unban Speler' Menu.\nVereist Heropenen.",
- "refreshpermissions": "Herlaad Permissies",
- "refreshpermissionsguide": "Dit herlaad je huidige permissies.\nVereist Heropenen.",
- "godmodedetected": "Godmode: ~r~Gevonden~w~",
- "godmodenotdetected": "Godmode: ~g~Niet Gevonden~w~",
- "antiragdoll": "~r~Anti-Ragdoll~w~",
- "health": "Health",
- "armor": "Armor",
- "wantedlevel": "Wanted Level",
- "exitspectator": "Druk op E om spectator mode te verlaten",
-
- "allowlist": "Je staat niet op de allowlist voor deze server",
- "checkingallowlist": "Checking allowlist..",
- "bannedjoin": "Je bent verbannen van deze Server, \nReden: %s, Ban Vervalt: %s, Ban ID: %s",
- "kicked": "Gekickt door %s, Reden: %s",
- "banned": "Je bent verbannen van deze Server, Reden: %s, Ban Vervalt: %s",
- "reasonadd": " ( Gebruikersnaam: %s ), Verbannen door: %s",
- "nongiven": "Geen reden opgegeven",
- "announcement": "Mededeling",
- "announcementguide": "Stuur een mededeling naar alle spelers",
- "adminannouncement": "**%s** stuurde een mededeling: **%s**",
- "playernotfound": "Speler kan niet gevonden worden.",
- "done": "Afgerond!",
-
- "adminkickedplayer": "**%s** Gekickt **%s**, Reden: %s",
- "adminbannedplayer": "**%s** banned **%s**, Reden: %s, Ban Vervalt: %s, ID: %s",
- "adminunbannedplayer": "**%s** Ban ongedaan gemaakt **%s** [ %s ]",
- "adminslappedplayer": "**%s** sloeg **%s** for **%s HP**",
- "adminfrozeplayer": "**%s** bevroor **%s**.",
- "adminunfrozeplayer": "**%s** gestopt met bevriezen **%s**.",
-
- "left": "Links",
- "middle": "Midden",
- "right": "Rechts",
- "menuOrientation": "Menu Orientatie",
- "menuOrientationguide": "Stel Menu Orientatie in ( Links, Rechts of Midden ) \nVereist Game restart.",
- "menuOffset": "Menu Grootte",
- "menuOffsetguide": "Stel Menu Grootte in\nVereist menu Heropenen",
- "resetmenuOffset": "Reset Menu Grootte",
- "takescreenshot": "Neem Schermafbeelding",
- "admintookscreenshot": "**%s** Nam een Schermafbeelding van **%s** zijn Scherm: %s",
- "screenshotinprogress": "een Schermafbeelding is is al aan de gang, even geduld aub!",
- "screenshotlink": "De schermafbeelding is beschikbaar hier: %s",
- "anonymous": "Anonieme Admin",
- "anonymousguide": "Verberg je naam bij het gebruik van EasyAdmin.",
- "adminofflinebannedplayer": "**%s** offline is gebanned **%s**, Reden: %s, Ban verloopt op: %s",
- "cachedplayers": "Opgeslagen Spelers",
- "refreshcachedplayers": "Herlaad Opgeslage Spelers",
- "refreshcachedplayersguide": "Herlaad de opgeslagen spelers, je moet wel het menu heropenen",
- "adminrequestedofflineinfo": "**%s** heeft gebruikersgegevens aangevraagd van een offline speler **%s**",
- "nextpage": "Volgende Pagina»",
- "firstpage": "««Eerste Pagina",
- "lastpage": "Laatste Pagina»»",
- "previouspage": "«Vorige Pagina",
- "playercalledforadmin": "Speler %s wil hulp van een admin!\nReden: %s\nID: %s\n",
- "playerreportedplayer": "Speler %s heeft een speler gerapporteerd!\n%s, Reden: %s\nReport %s/%s\nID: %s\n",
- "successfullyreported": "De speler is succesvol gerapporteerd!",
- "reportbantext": "Gerapporteerd door %s Spelers in een zeer korte tijd.",
- "alreadyreported": "Je hebt deze speler al gerapporteerd!",
- "reportedusageerror": "Error! Gebruik: /report naam reden",
- "admincalled": "Succesvol hulp gevraagd aan een admin!",
-
- "spectatedplayer": "**%s** is aan het kijken naar **%s**",
- "teleportedtoplayer": "**%s** geteleporteerd naar **%s**",
- "searchbans": "Zoek Bans",
- "searchbansfail": "Geen vergelijkbare ban gevonden.",
- "identifier": "Identifier %s",
- "warnplayer": "Waarschuw Speler",
- "warnreasonguide": "Geef een reden voor de waarschuwing.",
- "confirmwarn": "Bevestig Waarschuwing",
- "confirmwarnguide": "~r~~h~NOTITIE:~h~~w~ Als je het bevestigt, krijgt de speler de waarschuwing te zien.",
- "warnedtitle": "Waarschuwing",
- "warnedby": "gewaarschuwd door",
- "warndismiss": "Houd spatiebalk 10 seconden ingedrukt, om de waarschuwing te accepteren.",
- "warned": "Je bent gewaarschuwd, Reden: %s, Waarschuwing %s/%s",
- "warnkicked": "Je bent gekicked, omdat je teveel waarschuwingen hebt ontvangen.",
- "warnbanned": "Te vaak gewaarschuwd.",
- "adminwarnedplayer": "**%s** heeft **%s** gewaarschuwd, Reden: %s, Waarschuwing %s/%s",
-
- "searchuser": "Zoek gebruiker",
- "searchuserguide": "Zoek een speler met behulp van zijn gebruikersnaam of ID",
-
- "setconvar": "Pas de Convar aan",
- "setconvarguide": "~r~NOTITIE: Gebruik dit alleen, als je weet wat je aan het doen bent!~w~\nVeranderd de Convar",
- "adminchangedconvar": "**%s** veranderde de convar **%s** to **%s**",
- "adminstartedresource": "**%s** startte resource **%s**",
- "adminstoppedresource": "**%s** stopte resource **%s**",
-
- "convarname": "Convar Naam",
- "convarvalue": "Convar Waarde",
-
- "cleanarea": "Opruim Gebied",
- "cleanareaguide": "Verwijdert alle entities van het geselecteerde type",
- "cars": "Voertuigen",
- "peds": "Herzenlozen",
- "props": "Voorwerpen",
- "cleaningcar": "Voertuigen aan het verwijderen %s",
- "cleaningped": "Herzenlozen aan het verwijderen %s",
- "cleaningprop": "Voorwerpen aan het verwijderen %s",
- "finishedcleaning": "Klaar met verwijderen %s",
- "admincleanedup": "**%s** Alle **%s** in een **%s** gebied zijn verwijderd.",
- "radius": "Radius",
- "type": "Type",
- "deepclean":"Grondige Schoonmaak",
- "deepcleanguide":"Verwijdert ook client entities.",
-
- "forceeasteregg": "Forceer Easter Egg",
-
- "permissioneditor": "Permissies Aanpassen",
- "permissioneditorguide": "Pas de permissies aan, opgeslagen in ~g~easyadmin_permissions.cfg~w~",
-
- "aces": "ACEs",
- "permission": "Permissies",
- "principals": "Principals",
- "addace": "~g~ACE toevoegen",
- "addaceguide": "Je kan het aanpassen, voordat je het opslaat.",
- "addprincipal": "~g~Principal toevoegen",
- "group": "Groep",
- "entergroup": "Voeg groep naam toe (bijv. group.admin)",
- "enterperm": "Vul permissie naam in (bijv. easyadmin.player.kick)",
- "state": "Staat",
- "stateguide": "Permissies weigeren functioneerd niet, sta alleen permissies toe.",
- "location": "Locatie",
- "locationguide": "Deze waarde kan niet aangepast worden.",
- "principal": "Principal",
- "enterprincipal": "Vul een principal in (bijv. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Verwijder permissies",
- "deletepermissionguide": "~r~Waarschuwing! Dit zal de permissie intrekken en verwijderen!",
- "deleteprincipal": "~r~Verwijder Principal",
- "deleteprincipalguide": "~r~Waarschuwing! Dit zal de Principal intrekken en verwijderen!",
-
- "itemdeleted": "~r~Het voorwerp is verwijderd.",
- "savechanges": "~g~Sla de wijzigingen op.",
- "savechangesguide": "~r~Waarschuwing! ~w~Dit kan niet ongedaan worden gemaakt!",
- "admineditedpermissions": "**%s** heeft de server permissies aangepast.",
-
- "reportviewer": "Report Overzicht",
- "call": "Oproep",
- "report": "Report",
- "open": "Open",
- "reporter": "Reporter",
- "reported": "Gerapporteerd",
- "closereport": "Sluit Report",
- "closesimilarreports": "~r~Sluit alle soortgelijke reports~w~",
- "closesimilarreportsguide": "Zal alle reports van deze gebruiker verwijderen.",
- "adminclosedreport": "**%s** sloot Report #**%s**",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "entertoopen": "Selecteer om de opties voor de speler te bekijken.",
- "refreshreports": "Vernieuw Reports",
- "refreshreportsguide": "Laat nieuwe reports zien, als er nieuwe zijn.",
- "waitbeforeusingagain": "Je moet wachten voor je dit opnieuw kan gebruiken!",
- "invalidreport": "Je moet een reden specificeren!",
- "claimreport":"Claim Report",
- "claimedby":"Geclaimed Door",
- "reportalreadyclaimed": "Deze report is al geclaimed!",
- "notification":"Notificatie",
- "deferral":"Banlijst aan het checken, even geduld.. (%s%%)",
- "savebanchanges":"Sla aanpassingen op",
- "savebanguide":"~r~~h~NOTE:~h~~w~ Als je dit bevestigt zal de ban worden geüpdatet.",
- "adminimmune":"Je hebt geen permissie om dit te doen, die speler is immuun.",
- "teleportmeback":"Teleport jezelf terug",
- "teleportplayerback":"Teleport Speler terug",
- "teleportintoclosestvehicle":"in het dichtstbijzijnde voertuig",
-
- "copiedtoclipboard":"Tekst gekopieerd naar het klembord!",
-
- "spectatevehicleseatoccupied":"Het voertuig waar je net in zat is nu bezet.",
- "spectatenovehiclefound":"Het voertuig waar je net in zat kan niet worden gevonden.",
- "screenreader":"Screen Reader (TTS)",
- "screenreaderguide":"Schakelt Text to Speech in voor de GUI"
-
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/language/pl.json b/server-data/resources/[esx]/EasyAdmin/language/pl.json
deleted file mode 100644
index 38c9b73bf..000000000
--- a/server-data/resources/[esx]/EasyAdmin/language/pl.json
+++ /dev/null
@@ -1,241 +0,0 @@
-[{
- "translator": "EasyAdmin, robbybaseplate, Kubamaz",
- "language": "pl",
- "on": "Włącz",
- "off": "Wyłącz",
- "spectatingUser": "Obserwowanie ~b~%s.",
- "stoppedSpectating": "Przerwano obserwację.",
- "hour": "Godzina",
- "hours": "Godziny",
- "day": "Dzień",
- "days": "Dni",
- "week": "Tydzień",
- "weeks": "Tygodnie",
- "month": "Miesiąc",
- "months": "Miesiące",
- "year": "Rok",
- "years": "Lata",
- "customtime": "Czas niestandardowy",
- "nocustombantime": "Najpierw musisz ustawić niestandardową długość bana!",
- "permanent": "Permanentny",
- "confirm": "Potwierdź",
- "playermanagement": "Zarządzanie Graczami",
- "servermanagement": "Zarządzanie Serwerem",
- "settings": "Ustawienia",
- "kickplayer": "Wyrzuć Gracza",
- "banplayer": "Zbanuj Gracza",
- "reason": "Powód",
- "kickreasonguide": "Dodaj powód wyrzucenia.",
- "noreason": "Nie określono przyczyny",
- "confirmkick": "Potwierdź wyrzucenie",
- "confirmkickguide": "~r~~h~UWAGA:~h~~w~ Naciśnięcie potwierdź spowoduje wyrzucenie tego Gracza z określonymi ustawieniami.",
- "banreasonguide": "Dodaj powód blokady.",
- "banlength": "Długość bana",
- "banlengthguide": "Do kiedy powinien zostać zbanowany Gracz?",
- "confirmban": "Potwierdź bana",
- "confirmbanguide": "~r~~h~UWAGA:~h~~w~ Naciśnięcie potwierdź spowoduje zablokowanie tego gracza z określonymi ustawieniami.",
- "mute": "Niemy Gracz",
- "muteguide": "~r~~h~NOTE:~h~~w~ Uniemożliwi to graczowi korzystanie z czatu tekstowego",
- "adminmutedplayer": "**%s** wyciszył **%s**",
- "adminunmutedplayer": "**%s** odciszył **%s**",
- "playermuted": "został wyciszony!",
- "playerunmuted": "został bez wyciszenia!",
- "playermute": "Jesteś wyciszony!",
- "spectateplayer": "Obserwuj gracza",
- "teleportplayer": "Teleport",
- "teleporttoplayer": "do gracza",
- "teleportplayertome": "gracza do mnie",
- "slapplayer": "Uderz Gracza",
- "setplayerfrozen": "Unieruchom gracza",
- "allplayers": "Wszyscy gracze",
- "teleporttome": "Teleportuj do mnie",
- "teleporttomeguide": "~r~~h~UWAGA:~h~~w~ Spowoduje to teleportację do ciebie ~h~wszystkich ~h~ graczy.",
- "setgametype": "Ustaw Tryb Gry",
- "setgametypeguide": "~r~~h~UWAGA:~h~~w~ Spowoduje to ustawienie Typu Gry zgodnie z listą serwerów.",
- "setmapname": "Ustaw Nazwę Mapy",
- "setmapnameguide": "~r~~h~UWAGA:~h~~w~ Spowoduje to ustawienie nazwy mapy zgodnie z listą serwerów.",
- "startresourcebyname": "Uruchom zasoby według nazwy",
- "startresourcebynameguide": "~r~~h~UWAGA:~h~~w~ Spowoduje to uruchomienie zasobu zainstalowanego na serwerze.",
- "stopresourcebyname": "Zatrzymaj zasoby według nazwy",
- "stopresourcebynameguide": "~r~~h~UWAGA:~h~~w~ Spowoduje to zatrzymanie zasobu zainstalowanego na serwerze.",
- "badidea": "Nie rób tego, proszę.",
- "viewbanlist": "Pokaż listę banów",
- "unbanplayer": "Odblokuj Gracza",
- "unbanplayerguide": "~r~~h~UWAGA:~h~~w~ Naciśnięcie Potwierdź spowoduje odblokowanie tego Gracza.",
- "banlistshowtype": "~h~Lista blokad:~h~ pokaż Typ",
- "unbanreasons": "Powód",
- "unbanlicenses": "Licencje",
- "banlistshowtypeguide": "Przełącz między przyczynami lub identyfikatorami banu w menu 'Odblokuj Gracza'.\nWymaga ponownego otwarcia.",
- "refreshbanlist": "Odśwież banlistę",
- "refreshbanlistguide": "To odświeża banlistę w menu 'Odblokuj Gracza'.\nWymaga ponownego otwarcia.",
- "refreshpermissions": "Odśwież uprawnienia",
- "refreshpermissionsguide": "To odświeża twoje obecne uprawnienia.\nWymaga ponownego otwarcia.",
- "godmodedetected": "Nieśmiertelność: ~r~Wykryta~w~",
- "godmodenotdetected": "Nieśmiertelność: ~g~Nie Wykryta~w~",
- "antiragdoll": "~r~Anty-Przewracanie~w~",
- "health": "Zdrowie",
- "armor": "Opancerzenie",
- "wantedlevel": "Poziom poszukiwań",
- "exitspectator": "Naciśnij E, aby wyjść z trybu obserwatora",
-
- "allowlist": "Nie ma Cię na białej liście tego serwera",
- "checkingallowlist": "Sprawdzanie listy dostępu..",
- "bannedjoin": "Zostałeś zbanowany na tym serwerze, \nPowód: %s, Czas trwania: %s, Ban ID: %s",
- "kicked": "Wyrzucony przez %s, Powód: %s",
- "banned": "Zostałeś zbanowany na tym serwerze, Powód: %s, Czas trwania: %s",
- "reasonadd": " ( Gracz: %s ), Zablokowany przez: %s",
- "nongiven": "Nie podano",
- "announcement": "Ogłoszenie",
- "announcementguide": "Wyślij ogłoszenie do wszystkich graczy",
- "adminannouncement": "**%s** wysłał ogłoszenie: **%s**",
- "playernotfound": "Nie można znaleźć gracza.",
- "done": "Zrobione!",
- "adminkickedplayer": "**%s** wyrzucił **%s**, Powód: %s",
- "adminbannedplayer": "**%s** zbanował **%s**, Powód: %s, Czas trwania: %s, ID: %s",
- "adminunbannedplayer": "**%s** odblokował **%s** [ %s ]",
- "adminslappedplayer": "**%s** uderzył **%s** za **%s HP**",
-
- "adminfrozeplayer": "**%s** zamrożony **%s**.",
- "adminunfrozeplayer": "**%s** odmrożony **%s**.",
-
- "left": "Lewa",
- "middle": "Środek",
- "right": "Prawa",
- "menuOrientation": "Orientacja menu",
- "menuOrientationguide": "Ustaw orientację menu ( Lewa, Prawa lub Środek ) \nWymaga restartu gry.",
- "menuOffset": "Przesunięcie menu",
- "menuOffsetguide": "Ustaw Przesunięcie menu\nWymaga Ponownego otwarcie menu.",
- "resetmenuOffset": "Resetuj przesunięcie menu ",
- "takescreenshot": "Zrzut ekranu",
- "admintookscreenshot": "**%s** zrobił zrzut ekranu **%s**'s Zrzut ekranu: %s",
- "screenshotinprogress": "Zrzut ekranu jest w trakcie tworzenia, zaczekaj!",
- "screenshotlink": "Zrzut ekranu jest dostępny tutaj: %s",
- "anonymous": "Anonimowy Admin",
- "anonymousguide": "Ukrywa twój nick kiedy wykonujesz akcje Administracyjne.",
- "adminofflinebannedplayer": "**%s** zbanowany offline **%s**, Powód: %s, Ban wygaśnie: %s",
- "cachedplayers": "Ostatni gracze",
- "refreshcachedplayers": "Odśwież ostatnich graczy",
- "refreshcachedplayersguide": "Odśwież listę zapisanych graczy, wymaga restartu menu.",
- "adminrequestedofflineinfo": "**%s** zarządał informacji gracza Offline **%s**",
- "nextpage": "Następna strona»",
- "firstpage": "««Pierwsza strona",
- "lastpage": "Ostatnia strona»»",
- "previouspage": "«Poprzednia strona",
- "playercalledforadmin": "Użytkownik %s wzywa Administratora!\nPowód: %s\nID: %s\n",
- "playerreportedplayer": "Użytkownik %s zgłosił gracza!\n%s, Powód: %s\nReport %s/%s\nID: %s\n",
- "successfullyreported": "Pomyślnie zgłoszono gracza!",
- "reportbantext": "Zgłosił %s Graczy w krótkim czasie.",
- "alreadyreported": "Już zgłosiłeś tego gracza!",
- "reportedusageerror": "Błąd! Użyj: /report nick powód",
- "admincalled": "Pomyślnie zawiadomiono Administratora!",
-
- "spectatedplayer": "**%s** ogląda **%s**",
- "teleportedtoplayer": "**%s** teleportowany do **%s**",
- "searchbans": "Wyszukaj bana",
- "searchbansfail": "Nie znaleziono bana z wprowadzonymi parametrami.",
- "identifier": "Identyfikator %s",
- "warnplayer": "Ostrzeż gracza",
- "warnreasonguide": "Dodaj powód do ostrzeżenia.",
- "confirmwarn": "Potwierdź ostrzeżenie",
- "confirmwarnguide": "~r~~h~UWAGA:~h~~w~ Naciśnięcie Potwierdź spowoduje ostrzeżenie użytkownika z określonymi ustawieniami.",
- "warnedtitle": "Ostrzeżenie",
- "warnedby": "ostrzeżony przez",
- "warndismiss": "Przytrzymaj spację przez 10 sekund aby odrzucić powiadomienie.",
- "warned": "Zostałeś ostrzeżony, Powód: %s, Ostrzeżenie %s/%s",
- "warnkicked": "Zostałeś wyrzucony z serwera, z powodu otrzymania zbyt wielu ostrzeżeń..",
- "warnbanned": "Ostrzeżono cię zbyt wiele razy.",
- "adminwarnedplayer": "**%s** ostrzegł **%s**, Powód: %s, Ostrzeżenie %s/%s",
-
- "searchuser": "Wyszukaj użytkownika",
- "searchuserguide": "Znajdź gracza, używając jego nazwy użytkownika lub identyfikatora",
-
- "setconvar": "Ustaw convar-a",
- "setconvarguide": "~r~UWAGA: Jeżeli nie wiesz co robisz, nie dotykaj tego!~w~\nZmienia convar-a",
- "adminchangedconvar": "**%s** zmieniono convar-a **%s** na **%s**",
- "adminstartedresource": "**%s** uruchomiono skrypt **%s**",
- "adminstoppedresource": "**%s** zatrzymano skrypt **%s**",
-
- "convarname": "Nazwa Convar-a",
- "convarvalue": "Wartość Convar-a",
-
- "cleanarea": "Wyczyść lokalizację",
- "cleanareaguide": "Usuń wszystkie pobliskie obiekty wybranego typu",
- "cars": "Pojazdy",
- "peds": "Pedy",
- "props": "Propy",
- "cleaningcar": "Usuwanie pojazdu %s",
- "cleaningped": "Usuwanie peda %s",
- "cleaningprop": "Usunięto obiekt %s",
- "finishedcleaning": "Zakończono czyszczenie %s",
- "admincleanedup": "**%s** Wszystkie **%s** w **%s** obszarze zostały usunięte.",
- "radius": "Zasięg",
- "type": "Rodzaj",
- "deepclean":"Głębokie Czyszczenie",
- "deepcleanguide":"Usuwa również podmioty po stronie klienta.",
-
- "forceeasteregg": "Wymuś Easter Egg-a",
-
- "permissioneditor": "Edytor uprawnień",
- "permissioneditorguide": "Edytuje uprawnienia na serwerze, zapisuje do ~g~easyadmin_permissions.cfg~w~",
-
- "aces": "Uprawnienia ACE",
- "permission": "Uprawnienia",
- "principals": "Principale",
- "addace": "~g~Dodaj uprawnienia ACE",
- "addaceguide": "Masz możliwość edytowania tego przed zapisaniem.",
- "addprincipal": "~g~Dodaj principala",
- "group": "Grupa",
- "entergroup": "Wprowadź nazwę grupy (np. group.admin)",
- "enterperm": "Wprowadź nazwę uprawnienia (np. easyadmin.player.kick)",
- "state": "Stan",
- "stateguide": "Odmawianie uprawnień nie działa poprawnie, zezwalaj tylko na uprawnienia, które chcesz, aby gracz posiadał.",
- "location": "Lokalizacja",
- "locationguide": "Ta wartość nie może być zmieniona.",
- "principal": "Principal",
- "enterprincipal": "Wprowadź identyfikator (np. identifier.steam:aabbccddeefff)",
- "deletepermission": "~r~Usuń uprawnienie",
- "deletepermissionguide": "~r~Ostrzeżenie! To całkowicie usunie uprawnienia!",
- "deleteprincipal": "~r~Usuń principala",
- "deleteprincipalguide": "~r~Ostrzeżenie! Spowoduje to całkowite usunięcie principala!",
-
- "itemdeleted": "~r~Ten element został usunięty.",
- "savechanges": "~g~Zapisz zmiany",
- "savechangesguide": "~r~Ostrzeżenie! ~w~To nie może być cofnięte!",
- "admineditedpermissions": "**%s** edytował uprawnienia serwera.",
-
- "reportviewer": "Otwórz zgłoszenia",
- "call": "Wezwanie",
- "report": "Zgłoszenie",
- "open": "Otwarty",
- "reporter": "Zgłaszający",
- "reported": "Zgłoszony",
- "closereport": "Zamknij zgłoszenie",
- "closesimilarreports": "~r~Zamknij wszystkie podobne zgłoszenia~w~",
- "closesimilarreportsguide": "Spróbuję znaleźć i usunąć raporty wykonane przez tego samego użytkownika.",
- "adminclosedreport": "**%s** zamknięte zgłoszenie #**%s**",
- "adminclaimedreport": "**%s** claimed Report #**%s**",
- "entertoopen": "Wybierz, aby wyświetlić opcje dla tego gracza.",
- "refreshreports": "Odśwież zgłoszenia",
- "refreshreportsguide": "Pokazuje nowe zgłoszenia, jeśli są jakieś od ostatniego otwarcia menu.",
- "waitbeforeusingagain": "Musisz poczekać przed użyciem tego ponownie!",
- "invalidreport": "Musisz podać powód!",
- "claimreport":"Zajmij zgłoszenie",
- "claimedby":"Zajęty przez",
- "reportalreadyclaimed": "To zgłoszenie zostało już zajęte!",
- "notification":"Powiadomienie",
- "deferral":"Sprawdzanie listy banów, proszę czekać.. (%s%%)",
- "savebanchanges":"Zapisz zmiany",
- "savebanguide":"~r~~h~UWAGA:~h~~w~ Naciśnięcie przycisku Potwierdź zaktualizuje ten ban na serwerze.",
- "adminimmune":"Nie masz uprawnień aby wykonać tą akcje, docelowy gracz jest nietykalny.",
- "teleportmeback":"Teleportuj mnie z powrotem",
- "teleportplayerback":"Teleportuj gracza z powrotem",
- "teleportintoclosestvehicle":"do najbliższego pojazdu",
-
- "copiedtoclipboard":"Tekst skopiowany do schowka!",
-
- "spectatevehicleseatoccupied":"Miejsce w pojeździe, na którym byłeś, jest teraz zajęte.",
- "spectatenovehiclefound":"Nie można już znaleźć pojazdu, w którym byłeś.",
- "screenreader":"Narrator (TTS)",
- "screenreaderguide":"Włącz narratora dla GUI"
-
-}]
diff --git a/server-data/resources/[esx]/EasyAdmin/package.json b/server-data/resources/[esx]/EasyAdmin/package.json
deleted file mode 100644
index 8cf1d3c80..000000000
--- a/server-data/resources/[esx]/EasyAdmin/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "dependencies": {
- "@discordjs/rest": "1.6.0",
- "@discordjs/core": "0.6.0",
- "@discordjs/formatters": "0.3.1",
- "@discordjs/collection": "1.5.1",
- "@discordjs/builders": "1.6.3",
- "@discordjs/util": "0.3.1",
- "@discordjs/ws": "0.8.1",
- "ascii-table": "0.0.9",
- "discord-api-types": "0.37.51",
- "discord.js": "14.12.1",
- "erlpack": "0.1.4",
- "juration": "0.1.1",
- "pretty-ms": "7.0.1",
- "sprintf-js": "1.1.2",
- "zlib-sync": "0.1.8"
- },
- "devDependencies": {
- "eslint": "8.46.0"
- },
- "resolutions": {
- "@discordjs/rest": "1.6.0",
- "@discordjs/core": "0.6.0",
- "@discordjs/formatters": "0.3.1",
- "@discordjs/collection": "1.5.1",
- "@discordjs/builders": "1.6.3",
- "@discordjs/util": "0.3.1",
- "@discordjs/ws": "0.8.1"
- }
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/.gitkeep b/server-data/resources/[esx]/EasyAdmin/plugins/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/eadiag/eadiag_server.lua b/server-data/resources/[esx]/EasyAdmin/plugins/eadiag/eadiag_server.lua
deleted file mode 100644
index e79da1f49..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/eadiag/eadiag_server.lua
+++ /dev/null
@@ -1,155 +0,0 @@
-Citizen.CreateThread(function()
- local diagActive = false
- RegisterCommand("eaDiag", function(source, args, rawCommand)
- if diagActive then
- PrintDebugMessage("eaDiag is still running, please wait, or report any errors!", 1)
- return false
- end
-
- if DoesPlayerHavePermission(source, "server") then
- diagActive = true
-
- PrintDebugMessage("eaDiag triggered, this may take a while, please do not restart EasyAdmin in the meantime.^7\n", 1)
-
- local supportData = {}
-
- PrintDebugMessage("Collecting EasyAdmin Config....^7\n", 1)
-
- local version,ismaster = GetVersion()
- supportData.config = {
- gamename = GetConvar("gamename", "not-rdr3"),
- version = version,
- ismaster = tostring(ismaster),
- ea_moderationNotification = GetConvar("ea_moderationNotification", "false"),
- ea_screenshoturl = GetConvar("ea_screenshoturl", 'https://wew.wtf/upload.php'),
- onesync = GetConvar("onesync", "off"),
- steam_webApiKey = GetConvar("steam_webApiKey", ""),
- ea_LanguageName = GetConvar("ea_LanguageName", "en"),
- ea_enableDebugging = GetConvar("ea_enableDebugging", "false"),
- ea_logLevel = GetConvar("ea_logLevel", 1),
- ea_minIdentifierMatches = GetConvarInt("ea_minIdentifierMatches", 2),
- ea_defaultKey = GetConvar("ea_defaultKey", "none"),
- ea_alwaysShowButtons = GetConvar("ea_alwaysShowButtons", "false"),
- ea_enableCallAdminCommand = GetConvar("ea_enableCallAdminCommand", "true"),
- ea_enableReportCommand = GetConvar("ea_enableReportCommand", "true"),
- ea_defaultMinReports = GetConvarInt("ea_defaultMinReports", 3),
- ea_MinReportPlayers = GetConvarInt("ea_MinReportPlayers", 12),
- ea_MinReportModifierEnabled = GetConvar("ea_MinReportModifierEnabled", "true"),
- ea_ReportBanTime = GetConvarInt("ea_ReportBanTime", 86400),
- ea_custombanlist = GetConvar("ea_custombanlist", "false"),
- ea_maxWarnings = GetConvarInt("ea_maxWarnings", 3),
- ea_warnAction = GetConvar("ea_warnAction", "kick"),
- ea_warningBanTime = GetConvarInt("ea_warningBanTime", 604800),
- ea_enableSplash = GetConvar("ea_enableSplash", "true"),
- ea_playerCacheExpiryTime = GetConvarInt("ea_playerCacheExpiryTime", 900),
- ea_chatReminderTime = GetConvarInt("ea_chatReminderTime", 0),
- ea_backupFrequency = GetConvarInt("ea_backupFrequency", 72),
- ea_maxBackupCount = GetConvarInt("ea_maxBackupCount", 10),
- ea_useTokenIdentifiers = GetConvar("ea_useTokenIdentifiers", "true"),
- }
-
- for i,v in pairs(supportData.config) do
- PrintDebugMessage(i.." = "..v, 4)
- end
-
- Wait(500)
-
- PrintDebugMessage("Collecting Server Config....^7\n", 1)
-
- local path = GetResourcePath(GetCurrentResourceName())
- local occurance = string.find(path, "/resources")
- local path = string.reverse(string.sub(string.reverse(path), -occurance))
-
- local servercfg = io.open(path.."server.cfg")
- if servercfg then
- supportData.serverconfig = servercfg:read("*a")
- servercfg:close()
-
- else
- PrintDebugMessage("Could not find your server.cfg file, it should be called `server.cfg` in the parent folder of `resources`, otherwise EasyAdmin cannot read it, this report may be incomplete.\n", 1)
- end
-
- PrintDebugMessage("Collecting easyadmin_permissions.cfg....^7\n", 1)
- local permissions = io.open(path.."easyadmin_permissions.cfg")
- if permissions then
- supportData.serverconfig = supportData.serverconfig.."\n#### The following are the contents of the easyadmin_permissions.cfg ####\n"..permissions:read("*a")
- permissions:close()
- else
- PrintDebugMessage("Could not find your easyadmin_permissions.cfg file, it should be called `easyadmin_permissions.cfg` in the parent folder of `resources`, otherwise EasyAdmin cannot read it, this report may be incomplete.\n", 1)
- end
-
- PrintDebugMessage("Collecting Players....^7\n", 1)
-
- local players = {}
- for i, player in pairs(GetPlayers()) do
- players[player] = GetPlayerIdentifiers(player)
- if IsPlayerAdmin(player) then
- PrintDebugMessage(GetPlayerName(player).." is an Admin.", 1)
- end
- end
-
- local lines = string.split(supportData.serverconfig, "\n")
-
- for i, line in pairs(lines) do
- if string.find(line, "add_ace group.admin easyadmin allow") then
- adminAllowed = true
- end
-
- if string.find(line, "add_principal identifier.steam") then
- local steamid = string.match(line, "add_principal identifier.steam:(.*) group")
- if not string.match(steamid,"%a") then
- PrintDebugMessage("Please double check the following line: \n"..line.."\n\nthe steamid might be in decimal format, it should be hexadecimal.\n", 1)
- end
- end
-
- if string.find(line, "add_ace group.") then
- if string.find(line, "deny") then
- PrintDebugMessage("The following line is denying permissions, this WILL cause problems, only allow permissions you want to allow! \n"..line.."\n", 1)
- end
- end
-
- end
-
-
-
-
- if supportData.config.steam_webApiKey == "" then
- PrintDebugMessage("POSSIBLE ISSUE: steam_webApiKey is not defined! Steam Identifiers will not work.\n", 1)
- end
-
- if supportData.config.ea_custombanlist == "true" then
- PrintDebugMessage("POSSIBLE ISSUE: Custom Banlist is enabled, this is no longer supported.\n", 1)
- end
-
- if supportData.config.ea_minIdentifierMatches <= 1 then
- PrintDebugMessage("POSSIBLE ISSUE: ea_minIdentifierMatches should never be less than 1.\n", 1)
- end
-
- if type(supportData.config.ea_defaultKey) == "number" then
- PrintDebugMessage("POSSIBLE ISSUE: ea_defaultKey should be a Key, not a Control id.\n", 1)
- end
-
- if supportData.config.ismaster then
- PrintDebugMessage("EasyAdmin isn't using the latest stable release, this may or may not be an issue.\n", 1)
- end
-
- if updateAvailable then
- PrintDebugMessage("POSSIBLE ISSUE: EasyAdmin is outdated, you should update ASAP.\n", 1)
- end
-
- if not adminAllowed then
- PrintDebugMessage("POSSIBLE ISSUE: 'add_ace group.admin easyadmin allow' is missing \n", 1)
- end
-
- PrintDebugMessage("eaDiag Finished.", 1)
- diagActive=false
-
-
-
-
- end
- end, false)
-
-
-
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/example_client.lua b/server-data/resources/[esx]/EasyAdmin/plugins/example_client.lua
deleted file mode 100644
index 601b9c01f..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/example_client.lua
+++ /dev/null
@@ -1,58 +0,0 @@
-
--- EasyAdmin Plugin Example, this allows injecting new UI Elements directly into EasyAdmin Menus, see NativeUILua Docs on Guides how to add new Items, below is an example code.
-
-local somevalue = false
-
--- functions MUST be prefixed with local!
-
-local function playerOption(playerId)
- local thisItem = NativeUI.CreateItem("Example Item","Player ID is "..playerId) -- create our new item
- thisPlayer:AddItem(thisItem) -- thisPlayer is global.
- thisItem.Activated = function(ParentMenu,SelectedItem)
- -- enter your clientside code here, this will be run once the button has been activated.
- somevalue = true -- set some value we want to undo once the menu closes.
-
- end
-
- if DoesPlayerHavePermission(-1, "player.kick") then -- you can also check if a user has a specific Permission.
- local thisExampleMenu = _menuPool:AddSubMenu(thisPlayer,"Example Submenu","",true) -- Submenus work, too!
- thisExampleMenu:SetMenuWidthOffset(menuWidth)
-
- local thisItem = NativeUI.CreateItem("Example Submenu Item","")
- thisExampleMenu:AddItem(thisItem) -- Items dont require a trigger.
-
- end
-end
-
-local function mainMenu()
- error("You have the example plugin enabled, this is only meant to be used as a template for new plugins.")
-end
-
-local function cachedMenu()
-end
-
-local function serverMenu()
-end
-
-local function settingsMenu()
-end
-
-local function menuRemoved()
- somevalue = false -- reset our value :)
-end
-
-
-local pluginData = {
- name = "Demo",
- functions = {
- mainMenu = mainMenu,
- playerMenu = playerOption,
- cachedMenu = cachedMenu,
- serverMenu = serverMenu,
- settingsMenu = settingsMenu,
- menuRemoved = menuRemoved,
- }
-}
-
--- uncomment to enable plugin
--- addPlugin(pluginData)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/example_server.lua b/server-data/resources/[esx]/EasyAdmin/plugins/example_server.lua
deleted file mode 100644
index f2eacb23d..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/example_server.lua
+++ /dev/null
@@ -1,8 +0,0 @@
--- EasyAdmin Plugin Example, you can run any server-code here, below is an example that shows this functionality
-
-if false == false then return end
-
-function foo(bar)
- return bar.." baz"
-end
-AddEventHandler("EasyAdmin:foo", foo)
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/example_shared.lua b/server-data/resources/[esx]/EasyAdmin/plugins/example_shared.lua
deleted file mode 100644
index 230df7fd5..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/example_shared.lua
+++ /dev/null
@@ -1,8 +0,0 @@
-
---[[ This code is disabled as it's an example.
-
-Citizen.CreateThread(function() -- needs to be in a thread.
- permissions["plugin.exmaple"] = false -- adds "easyadmin.plugin.example" Permission which can be used from both the clientside and server side to check for permissions.
-end
-
-]]
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/notifications/mythic-notify_client.lua b/server-data/resources/[esx]/EasyAdmin/plugins/notifications/mythic-notify_client.lua
deleted file mode 100644
index 606cbbfff..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/notifications/mythic-notify_client.lua
+++ /dev/null
@@ -1,20 +0,0 @@
---
--- This is an example Plugin to pass EasyAdmin's Internal events to an External Resource as a Notification, the reader is expected to form their own functions from this, editing this code is *NOT* recommended,
--- as updates will overwrite it, instead, make your own plugin from this example (copying the file and renaming it is enough.)
--- the end result will look like this: https://blumlaut.me/s/H9pHGsXgjAFeHDP/preview
---
--- Feel free to make Pull Requests to add aditional features for this, this is merely an example of whats possible.
---
-
--- this bit of code tells EasyAdmin to not draw the V Notification.
-AddEventHandler("EasyAdmin:receivedNotification", function()
- if GetResourceState("mythic-notify") == "started" then
- CancelEvent()
- end
-end)
-
-AddEventHandler("EasyAdmin:showNotification", function(text, important)
- if GetResourceState("mythic-notify") == "started" then
- exports['mythic_notify']:DoHudText('inform', text)
- end
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/notifications/pNotify_client.lua b/server-data/resources/[esx]/EasyAdmin/plugins/notifications/pNotify_client.lua
deleted file mode 100644
index d6781b301..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/notifications/pNotify_client.lua
+++ /dev/null
@@ -1,20 +0,0 @@
---
--- This is an example Plugin to pass EasyAdmin's Internal events to an External Resource as a Notification, the reader is expected to form their own functions from this, editing this code is *NOT* recommended,
--- as updates will overwrite it, instead, make your own plugin from this example (copying the file and renaming it is enough.)
--- the end result will look like this: https://blumlaut.me/s/H9pHGsXgjAFeHDP/preview
---
--- Feel free to make Pull Requests to add aditional features for this, this is merely an example of whats possible.
---
-
--- this bit of code tells EasyAdmin to not draw the V Notification.
-AddEventHandler("EasyAdmin:receivedNotification", function()
- if GetResourceState("pNotify") == "started" then
- CancelEvent()
- end
-end)
-
-AddEventHandler("EasyAdmin:showNotification", function(text, important)
- if GetResourceState("pNotify") == "started" then
- exports['pNotify']:SendNotification({layout = "centerLeft", type = "alert", text = text})
- end
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/plugins/notifications/t-notify_client.lua b/server-data/resources/[esx]/EasyAdmin/plugins/notifications/t-notify_client.lua
deleted file mode 100644
index 370327135..000000000
--- a/server-data/resources/[esx]/EasyAdmin/plugins/notifications/t-notify_client.lua
+++ /dev/null
@@ -1,20 +0,0 @@
---
--- This is an example Plugin to pass EasyAdmin's Internal events to an External Resource as a Notification, the reader is expected to form their own functions from this, editing this code is *NOT* recommended,
--- as updates will overwrite it, instead, make your own plugin from this example (copying the file and renaming it is enough.)
--- the end result will look like this: https://blumlaut.me/s/H9pHGsXgjAFeHDP/preview
---
--- Feel free to make Pull Requests to add aditional features for this, this is merely an example of whats possible.
---
-
--- this bit of code tells EasyAdmin to not draw the V Notification.
-AddEventHandler("EasyAdmin:receivedNotification", function()
- if GetResourceState("t-notify") == "started" then
- CancelEvent()
- end
-end)
-
-AddEventHandler("EasyAdmin:showNotification", function(text, important)
- if GetResourceState("t-notify") == "started" then
- exports['t-notify']:Alert({style = "error", message = text})
- end
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/admin_server.lua b/server-data/resources/[esx]/EasyAdmin/server/admin_server.lua
deleted file mode 100644
index 53a837fe9..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/admin_server.lua
+++ /dev/null
@@ -1,976 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
--- Chat Reminder Code
-function sendRandomReminder()
- reminderTime = GetConvarInt("ea_chatReminderTime", 0)
- if reminderTime ~= 0 and #ChatReminders > 0 then
- local reminder = ChatReminders[ math.random( #ChatReminders ) ] -- select random reminder from table
- local adminNames = ""
- local t = {}
- for i,_ in pairs(OnlineAdmins) do
- table.insert(t, getName(i))
- end
- for i,n in ipairs(t) do
- if i == 1 then
- adminNames = n
- elseif i == #t then
- adminNames = adminNames.." "..n
- else
- adminNames = adminNames.." "..n..","
- end
- end
- t=nil
-
- if adminNames == "" then adminNames = "@admins" end -- if no admins are online just print @admins
- reminder = string.gsub(reminder, "@admins", adminNames)
-
- reminder = string.gsub(reminder, "@bancount", #blacklist)
-
- reminder = string.gsub(reminder, "@time", os.date("%X", os.time()))
- reminder = string.gsub(reminder, "@date", os.date("%x", os.time()))
- TriggerClientEvent("chat:addMessage", -1, { args = { "EasyAdmin", reminder } })
- end
-end
-
-function announce(reason)
- if reason then
- TriggerClientEvent("EasyAdmin:showNotification", -1, "[" .. GetLocalisedText("announcement") .. "] " .. reason)
- return true
- else
- return false
- end
-end
-
-exports('announce', announce)
-
-Citizen.CreateThread(function()
- --Wait(10000)
- reminderTime = GetConvarInt("ea_chatReminderTime", 0)
- if reminderTime ~= 0 then
- while true do
- Wait(reminderTime*60000)
- sendRandomReminder()
- end
- else
- while true do
- Wait(20000)
- sendRandomReminder() -- check for changes in the convar
- end
- end
-end)
-
-
-function getAllPlayerIdentifiers(playerId) --Gets all info that could identify a player
- local identifiers = GetPlayerIdentifiers(playerId)
- local tokens = {}
- if GetConvar("ea_useTokenIdentifiers", "true") == "true" then
- if not GetNumPlayerTokens or not GetPlayerToken then
- PrintDebugMessage("Server Version is below artifact 3335, disabling Token identifiers, please consider updating your FXServer!", 1)
- SetConvar("ea_useTokenIdentifiers", "false")
- PrintDebugMessage("Set ea_useTokenIdentifiers to false for this session.", 1)
- return identifiers
- end
- for i=0,GetNumPlayerTokens(playerId) do
- table.insert(tokens, GetPlayerToken(playerId, i))
- end
- end
- return mergeTables(identifiers, tokens)
-end
-exports('getAllPlayerIdentifiers', getAllPlayerIdentifiers)
-
-
-function checkForChangedIdentifiers(playerIds, bannedIds)
- local unbannedIds = {}
- for _,playerId in pairs(playerIds) do
- local thisIdBanned = false
- for _,bannedId in pairs(bannedIds) do
- if playerId == bannedId then
- thisIdBanned = true
- end
- end
- if not thisIdBanned then --They have a new/changed identifier
- table.insert(unbannedIds, playerId)
- end
- end
- return unbannedIds
-end
-
-
-AddEventHandler('playerDropped', function (reason)
- if OnlineAdmins[source] then
- OnlineAdmins[source] = nil
- end
- if FrozenPlayers[source] then
- FrozenPlayers[source] = nil
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:SetPlayerFrozen", i, 1000, source, nil)
- end
- end
- if MutedPlayers[source] then
- MutedPlayers[source] = nil
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:SetPlayerMuted", i, 1000, source, nil)
- end
- end
- PrintDebugMessage(source.." disconnected.", 4)
-end)
-
-
-RegisterServerEvent("EasyAdmin:GetInfinityPlayerList", function()
- PrintDebugMessage(getName(source, true).." requested Playerlist.", 4)
- if IsPlayerAdmin(source) then
- local l = {}
- local players = GetPlayers()
-
- for i, player in pairs(players) do
- local player = tonumber(player)
- cachePlayer(player)
- for i, cached in pairs(CachedPlayers) do
- if (cached.id == player) then
- local pData = {id = cached.id, name = cached.name, immune = cached.immune}
- for i, v in pairs(cached.identifiers) do
- if v == "discord:178889658128793600" then
- pData.developer = true
- elseif v == "discord:736521574383091722" --[[ Jaccosf ]] or v == "discord:1001065851790839828" --[[ robbybaseplate ]] or v == "discord:840695262460641311" --[[ Knight ]] or v == "discord:270731163822325770" --[[ Skypo ]] or v == "discord:186980021850734592" --[[ coleminer0112 ]] then
- pData.contributor = true
- end
- end
- table.insert(l, pData)
- end
- end
- end
-
- -- each player is more or less 2000bytes big.
- TriggerLatentClientEvent("EasyAdmin:GetInfinityPlayerList", source, 200000, l)
- end
-end)
-
-function GetOnlineAdmins()
- return OnlineAdmins
-end
-exports('GetOnlineAdmins', GetOnlineAdmins)
-
-function IsPlayerAdmin(pid)
- return OnlineAdmins[pid]
-end
-exports('IsPlayerAdmin', IsPlayerAdmin)
-
-
-Citizen.CreateThread(function()
-
- if not CachedPlayers or GetVersion() == nil then
- print("^7--------------------------------------------------------------")
- print("^1EasyAdmin self-test failed! Your EasyAdmin **will not work**, likely you edited some files and broke EasyAdmin in the progress, please reinstall EasyAdmin.")
- print("^7--------------------------------------------------------------")
- return
- end
-
- if GetConvar("gamename", "gta5") == "rdr3" then
- RedM = true
- PrintDebugMessage("Starting in rdr3 Mode.", 4)
- else
- RedM = false
- PrintDebugMessage("Starting in gta5 Mode.", 4)
- end
-
- AnonymousAdmins = {}
-
- loadLanguageStrings()
-
- moderationNotification = GetConvar("ea_moderationNotification", "false")
- reportNotification = GetConvar("ea_reportNotification", "false")
- detailNotification = GetConvar("ea_detailNotification", "false")
- minimumMatchingIdentifierCount = GetConvarInt("ea_minIdentifierMatches", 2)
-
-
- RegisterServerEvent('EasyAdmin:amiadmin', function()
- local source = source
-
- cachePlayer(source) -- this will do nothing if player is already cached.
-
- if CachedPlayers[source].lastPermRequest and CachedPlayers[source].lastPermRequest+10 > os.time() then
- PrintDebugMessage(getName(source).." hit Permission Check Ratelimit! "..CachedPlayers[source].lastPermRequest+10-os.time().." seconds left.", 3)
- return
- end
-
- CachedPlayers[source].lastPermRequest = os.time()
-
- local identifiers = getAllPlayerIdentifiers(source)
- local perms = {}
- for perm,val in pairs(permissions) do
- local thisPerm = DoesPlayerHavePermission(source, perm)
- if perm == "player.screenshot" and not screenshots then
- thisPerm = false
- end
- if string.find(perm, "server.permissions") and disablePermissionEditor then
- thisPerm = false
- end
- --if (perm == "teleport" or perm == "spectate") and infinity then
- --if (perm == "spectate") and infinity then
- -- thisPerm = false
- --end
- if thisPerm == true then
- OnlineAdmins[source] = true
- end
- perms[perm] = thisPerm
- PrintDebugMessage("Processed Perm "..perm.." for "..getName(source, true)..", result: "..tostring(thisPerm), 3)
- end
-
- TriggerLatentClientEvent("EasyAdmin:adminresponse", source, 10000, perms)
- TriggerClientEvent('chat:addSuggestion', source, '/easyadmin', "EasyAdmin Menu", {{name="report or player id", help="[Optional] Report or Player ID"}})
- TriggerClientEvent('chat:addSuggestion', source, '/ea', "EasyAdmin Menu", {{name="report or player id", help="[Optional] Report or Player ID"}})
-
- if GetConvar("ea_enableReportCommand", "true") == "true" then
- TriggerClientEvent('chat:addSuggestion', source, '/'..GetConvar("ea_reportCommandName", "report"), "Report player", {{name='player', help="player name / id"}, {name='reason', help="Reason"}})
- end
-
- if GetConvar("ea_enableCallAdminCommand", "true") == "true" then
- TriggerClientEvent('chat:addSuggestion', source, '/'..GetConvar("ea_callAdminCommandName", "calladmin"), "Call Admin", {{name='reason', help="Reason"}})
- end
-
-
-
- if RedM then
- -- give player the right settings to work with
- local key = GetConvar("ea_defaultKey", "none")
-
- TriggerClientEvent("EasyAdmin:SetSetting", source, "button", key)
- end
-
- if GetConvar("ea_alwaysShowButtons", "false") == "true" then
- TriggerClientEvent("EasyAdmin:SetSetting", source, "forceShowGUIButtons", true)
- else
- TriggerClientEvent("EasyAdmin:SetSetting", source, "forceShowGUIButtons", false)
- end
- if updateAvailable then
- TriggerClientEvent("EasyAdmin:SetSetting", source, "updateAvailable", updateAvailable)
- end
-
- -- if you remove this code then you're a killjoy, can't we have nice things? just once? it's not like this changes the whole admin menu or how it behaves, its a single subtitle.
- if os.date("%d/%m") == "22/08" then
- local age = tonumber(os.date("%Y"))-2017 local ordinal = "th" last_digit = age % 10 if last_digit == 1 and age ~= 11 then ordinal = 'st' elseif last_digit == 2 and age ~= 12 then ordinal = 'nd' elseif last_digit == 3 and age ~= 13 then ordinal = 'rd' end
- TriggerClientEvent("EasyAdmin:SetSetting", source, "alternativeTitle", "~b~Today is EasyAdmin's "..age..""..ordinal.." birthday! :)")
- elseif os.date("%m") == "06" and (tonumber(os.date("%d")) >= 1 and tonumber(os.date("%d")) <= 14) then
- TriggerClientEvent("EasyAdmin:SetSetting", source, "alternativeLogo", "pride")
- elseif os.date("%m") == "04" and os.date("%d") == "01" then
- TriggerClientEvent("EasyAdmin:SetSetting", source, "alternativeLogo", "logo-hardadmin")
- TriggerClientEvent("EasyAdmin:SetSetting", source, "alternativeBanner", "banner-hardadmin")
- end
-
- if (infinity) then
- TriggerClientEvent("EasyAdmin:SetSetting", source, "infinity", true)
- end
-
- TriggerLatentClientEvent("EasyAdmin:fillShortcuts", source, 10000, MessageShortcuts)
-
- TriggerLatentClientEvent("EasyAdmin:SetLanguage", source, 10000, strings)
-
- end)
-
- RegisterServerEvent("EasyAdmin:kickPlayer", function(playerId,reason)
- if DoesPlayerHavePermission(source, "player.kick") and not CachedPlayers[playerId].immune then
- reason = formatShortcuts(reason)
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminkickedplayer"), getName(source, false, true), getName(playerId, true, true), reason), "kick", 16711680)
- PrintDebugMessage("Kicking Player "..getName(source, true).." for "..reason, 3)
- DropPlayer(playerId, string.format(GetLocalisedText("kicked"), getName(source), reason) )
- elseif CachedPlayers[playerId].immune then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune"))
- end
- end)
-
- RegisterServerEvent("EasyAdmin:requestSpectate", function(playerId)
- if DoesPlayerHavePermission(source, "player.spectate") then
- PrintDebugMessage("Player "..getName(source,true).." Requested Spectate to "..getName(playerId,true), 3)
- local tgtCoords = GetEntityCoords(GetPlayerPed(playerId))
- TriggerClientEvent("EasyAdmin:requestSpectate", source, playerId, tgtCoords)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('spectatedplayer'), getName(source, false, true), getName(playerId, true, true)), "spectate", 16777214)
- end
- end)
-
- function cleanupArea(type, radius, player)
- if not radius then radius = "global" end
- if (onesync ~= "off" and onesync ~= "legacy") then
- local toDelete = {}
- if type == "cars" then
- toDelete = GetAllVehicles()
- elseif type == "peds" then
- toDelete = GetAllPeds()
- elseif type == "props" then
- toDelete = GetAllObjects()
- end
- PrintDebugMessage("server-known entities: "..table_to_string(toDelete), 4)
- for _,entity in pairs(toDelete) do
- PrintDebugMessage("starting deletion for entity "..entity, 4)
- if DoesEntityExist(entity) and not (type == "cars" and IsPedAPlayer(GetPedInVehicleSeat(entity, -1))) and not (type == "peds" and IsPedAPlayer(entity)) then
- if radius == "global" then
- PrintDebugMessage("deleting entity "..entity, 3)
- DeleteEntity(entity)
- else
- local entityCoords = GetEntityCoords(entity)
- local playerCoords = GetEntityCoords(GetPlayerPed(player))
- if #(playerCoords - entityCoords) < radius then
- PrintDebugMessage("deleting entity "..entity, 3)
- DeleteEntity(entity)
- end
- end
- end
- end
- return true
- else
- return false
- end
- end
- exports('cleanupArea', cleanupArea)
-
- RegisterServerEvent("EasyAdmin:requestCleanup", function(type, radius, deep)
- local source=source
- if DoesPlayerHavePermission(source, "server.cleanup."..type) then
- PrintDebugMessage("Player "..getName(source,true).." Requested Cleanup for "..type, 3)
- cleanupArea(type, radius, source)
-
- if deep then
- TriggerClientEvent("EasyAdmin:requestCleanup", source, type, radius)
- end
- TriggerClientEvent("EasyAdmin:showNotification", source, string.format(GetLocalisedText("finishedcleaning"), GetLocalisedText(type)))
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('admincleanedup'), getName(source, false, true), type, radius), "cleanup", 16777214)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:SetGameType", function(text)
- if DoesPlayerHavePermission(source, "server.convars") then
- PrintDebugMessage("Player "..getName(source,true).." set Gametype to "..text, 3)
- SetGameType(text)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('adminchangedconvar'), getName(source, false, true), "gametype", text), "settings", 16777214)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:SetMapName", function(text)
- if DoesPlayerHavePermission(source, "server.convars") then
- PrintDebugMessage("Player "..getName(source,true).." set Map Name to "..text, 3)
- SetMapName(text)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('adminchangedconvar'), getName(source, false, true), "mapname", text), "settings", 16777214)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:StartResource", function(text)
- if DoesPlayerHavePermission(source, "server.resources.start") then
- PrintDebugMessage("Player "..getName(source,true).." started Resource "..text, 3)
- StartResource(text)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('adminstartedresource'), getName(source, false, true), text), "settings", 65280)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:StopResource", function(text)
- if DoesPlayerHavePermission(source, "server.resources.stop") then
- PrintDebugMessage("Player "..getName(source,true).." stopped Resource "..text, 3)
- StopResource(text)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('adminstoppedresource'), getName(source, false, true), text), "settings", 16711680)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:SetConvar", function(convarname, convarvalue)
- if DoesPlayerHavePermission(source, "server.convars") then
- PrintDebugMessage("Player "..getName(source,true).." set convar "..convarname.. " to "..convarvalue, 3)
- SetConvar(convarname, convarvalue)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('adminchangedconvar'), getName(source, false, true), convarname, convarvalue), "settings", 16777214)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:Announce", function(text)
- if DoesPlayerHavePermission(source, "server.announce") then
- PrintDebugMessage("Player "..getName(source,true).." sent a announcement: "..text, 3)
- announce(text)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText('adminannouncement'), getName(source, false, true), text), "settings", 16777214)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:TeleportPlayerToCoords", function(playerId,tgtCoords)
- if DoesPlayerHavePermission(source, "player.teleport.single") then
- PrintDebugMessage("Player "..getName(source,true).." requsted teleport to "..tgtCoords.x..", "..tgtCoords.y..", "..tgtCoords.z, 3)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- local playerName = getName(playerId, true, true)
- if playerId == -1 then
- playerName = GetLocalisedText("allplayers")
- end
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("teleportedtoplayer"), playerName, getName(source, false, true)), "teleport", 16777214)
- TriggerClientEvent("EasyAdmin:TeleportRequest", playerId, false, tgtCoords)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:TeleportAdminToPlayer", function(id)
- if not CachedPlayers[id].dropped and DoesPlayerHavePermission(source, "player.teleport.single") then
- local tgtPed = GetPlayerPed(id)
- local tgtCoords = GetEntityCoords(tgtPed)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("teleportedtoplayer"), getName(source, false, true), getName(id, true, true)), "teleport", 16777214)
- TriggerClientEvent('EasyAdmin:TeleportRequest', source, id,tgtCoords)
- else
- PrintDebugMessage('EASYADMIN FAILED TO TELEPORT'..source..' TO ID: '..id, 2)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:TeleportPlayerBack", function(id)
- if not CachedPlayers[id].dropped and DoesPlayerHavePermission(source, "player.teleport.single") then
- TriggerClientEvent('EasyAdmin:TeleportPlayerBack', id)
- end
- end)
-
- function slapPlayer(playerId,slapAmount)
- if not CachedPlayers[playerId].immune then
- TriggerClientEvent("EasyAdmin:SlapPlayer", playerId, slapAmount)
- return true
- else
- return false
- end
- end
- exports('slapPlayer', slapPlayer)
-
- RegisterServerEvent("EasyAdmin:SlapPlayer", function(playerId,slapAmount)
- if DoesPlayerHavePermission(source, "player.slap") and slapPlayer(playerId, slapAmount) then
- PrintDebugMessage("Player "..getName(source,true).." slapped "..getName(playerId,true).." for "..slapAmount.." HP", 3)
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("adminslappedplayer"), getName(source, false, true), getName(playerId, true, true), slapAmount), "slap", 16777214)
- elseif CachedPlayers[playerId].immune then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune"))
- end
- end)
-
- function freezePlayer(playerId, toggle)
- if not toggle then toggle = not FrozenPlayers[playerId] end
- if not CachedPlayers[playerId].immune then
- FrozenPlayers[playerId] = (toggle == true or nil)
- TriggerClientEvent("EasyAdmin:FreezePlayer", playerId, toggle)
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:SetPlayerFrozen", i, 1000, playerId, (toggle == true or nil))
- end
- return true
- else
- return false
- end
- end
- exports('freezePlayer', freezePlayer)
-
- RegisterServerEvent("EasyAdmin:FreezePlayer", function(playerId,toggle)
- if DoesPlayerHavePermission(source, "player.freeze") and not CachedPlayers[playerId].immune then
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- freezePlayer(playerId, toggle)
- if toggle then
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("adminfrozeplayer"), getName(source, false, true), getName(playerId, true, true)), "freeze", 16777214)
- PrintDebugMessage("Player "..getName(source,true).." froze "..getName(playerId,true), 3)
- else
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("adminunfrozeplayer"), getName(source, false, true), getName(playerId, true, true)), "freeze", 16777214)
- PrintDebugMessage("Player "..getName(source,true).." unfroze "..getName(playerId,true), 3)
- end
- elseif CachedPlayers[playerId].immune then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune"))
- end
- end)
-
- scrinprogress = false
-
- function isScreenshotInProgress()
- return scrinprogress
- end
- exports('isScreenshotInProgress', isScreenshotInProgress)
-
- RegisterServerEvent("EasyAdmin:TakeScreenshot", function(playerId)
- if scrinprogress then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("screenshotinprogress"))
- return
- end
- local src=source
- local playerId = playerId
- local invokingResource
- if GetInvokingResource() and GetInvokingResource() ~= GetCurrentResourceName() then
- invokingResource = "`"..GetInvokingResource().."`"
- end
-
- if DoesPlayerHavePermission(source, "player.screenshot") then
- scrinprogress = true
- thistemporaryevent = RegisterServerEvent("EasyAdmin:TookScreenshot", function(result)
- if result == "ERROR" then return false end
-
- res = matchURL(tostring(result))
-
- PrintDebugMessage("Screenshot taken, result:\n "..res, 4)
- SendWebhookMessage(moderationNotification, string.format(GetLocalisedText("admintookscreenshot"), invokingResource or getName(src), getName(playerId, true, true), res), "screenshot", 16777214, "Screenshot Captured", res)
- TriggerClientEvent('chat:addMessage', src, { template = '', args = { res } })
- TriggerClientEvent("chat:addMessage", src, { args = { "EasyAdmin", string.format(GetLocalisedText("screenshotlink"), res) } })
- PrintDebugMessage("Screenshot for Player "..getName(playerId,true).." done, "..res.." requsted by"..getName(src,true), 3)
- scrinprogress = false
- RemoveEventHandler(thistemporaryevent)
- end)
-
- TriggerClientEvent("EasyAdmin:CaptureScreenshot", playerId)
- local timeoutwait = 0
- repeat
- timeoutwait=timeoutwait+1
- Wait(5000)
- if timeoutwait == 5 then
- RemoveEventHandler(thistemporaryevent)
- scrinprogress = false -- cancel screenshot, seems like it failed
- PrintDebugMessage("Screenshot timed out", 4)
- TriggerClientEvent("EasyAdmin:showNotification", src, "Screenshot Failed!")
- end
- until not scrinprogress
- end
- end)
-
- RegisterServerEvent("EasyAdmin:mutePlayer", function(playerId)
- local src = source
- if DoesPlayerHavePermission(src,"player.mute") and not CachedPlayers[playerId].immune then
- local muted = mutePlayer(playerId, not MutedPlayers[playerId])
-
- if muted then
- if MutedPlayers[playerId] then
- TriggerClientEvent("EasyAdmin:showNotification", src, getName(playerId) .. " " .. GetLocalisedText("playermuted"))
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminmutedplayer"), getName(source, false, true), getName(playerId, false, true)), "mute", 16777214)
- else
- TriggerClientEvent("EasyAdmin:showNotification", src, getName(playerId) .. " " .. GetLocalisedText("playerunmuted"))
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminunmutedplayer"), getName(source, false, false), getName(playerId, false, true)), "mute", 16777214)
- end
- else
- -- todo: handle false retval
- end
- end
- end)
-
- function mutePlayer(playerId, toggle)
- if not CachedPlayers[playerId].immune then
- if toggle and not MutedPlayers[playerId] then
- MutedPlayers[playerId] = true
- if MumbleSetPlayerMuted then -- workaround for outdated servers
- MumbleSetPlayerMuted(playerId, true)
- end
- PrintDebugMessage("muted "..getName(playerId,true), 3)
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:SetPlayerMuted", i, 1000, playerId, (MutedPlayers[playerId] == true or nil))
- end
- return true
- elseif not toggle and MutedPlayers[playerId] then
- MutedPlayers[playerId] = nil
- if MumbleSetPlayerMuted then -- workaround for outdated servers
- MumbleSetPlayerMuted(playerId, false)
- end
- PrintDebugMessage("unmuted "..getName(playerId,true), 3)
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:SetPlayerMuted", i, 1000, playerId, (MutedPlayers[playerId] == true or nil))
- end
- return true
- else
- return false
- end
- else
- return false
- end
- end
- exports('mutePlayer', mutePlayer)
-
- RegisterServerEvent("EasyAdmin:SetAnonymous", function(playerId)
- if DoesPlayerHavePermission(source, "anon") then
- if AnonymousAdmins[source] then
- AnonymousAdmins[source] = nil
- PrintDebugMessage("Player "..getName(source,true).." un-anoned themself", 3)
- else
- AnonymousAdmins[source] = true
- PrintDebugMessage("Player "..getName(source,true).." anoned themself", 3)
- end
- end
- end)
-
- -- Very basic function that turns "source" into a useable player name.
- function getName(src,anonymousdisabled,identifierenabled)
- local identifierPref = GetConvar("ea_logIdentifier", "steam,discord,license")
- if identifierPref == "false" then identifierenabled = false end;
- local identifiers, identifier = {}, "~No Identifier~"
- if (src == 0 or src == "") then
- return "Console"
- else
- if AnonymousAdmins[src] and not anonymousdisabled then
- return GetLocalisedText("anonymous")
- elseif CachedPlayers[src] and CachedPlayers[src].name then
- if CachedPlayers[src].identifiers then
- if identifierPref then
- -- split identifierPref by comma and find first identifier in CachedPlayers[src].identifiers that starts with the split string
- -- this code was written by GitHub Copilot, neat, huh?
- for i,v in ipairs(identifierPref:split(",")) do
- for i2,v2 in ipairs(CachedPlayers[src].identifiers) do
- if string.sub(v2, 1, string.len(v)) == v then
- identifier = v2
- break
- end
- end
- if identifier ~= "~No Identifier~" then break end
- end
- end
- end
- if identifier:find('discord:') then
- identifier = string.gsub(identifier, "discord:", "")
- identifier = "<@"..identifier..">"
- end
- if identifierenabled then
- return (string.format("%s [ %s ]", CachedPlayers[src].name, identifier))
- else
- return CachedPlayers[src].name
- end
- elseif (GetPlayerName(src)) then
- identifiers = getAllPlayerIdentifiers(src)
- if identifierPref then
- for i,v in ipairs(identifierPref:split(",")) do
- for i2,v2 in ipairs(identifiers) do
- if string.sub(v2, 1, string.len(v)) == v then
- identifier = v2
- break
- end
- end
- if identifier ~= "~No Identifier~" then break end
- end
- end
- if identifier:find('discord:') then
- identifier = string.gsub(identifier, "discord:", "")
- identifier = "<@"..identifier..">"
- end
- if identifierenabled then
- return (string.format("%s [ %s ]", GetPlayerName(src), identifier))
- else
- return GetPlayerName(src)
- end
- else
- return "Unknown - " .. src
- end
- end
- end
- exports('getName', getName)
-
- RegisterServerEvent("EasyAdmin:warnPlayer", function(id, reason)
- local src = source
- if DoesPlayerHavePermission(src,"player.warn") and not CachedPlayers[id].immune then
- reason = formatShortcuts(reason)
- local maxWarnings = GetConvarInt("ea_maxWarnings", 3)
- if not WarnedPlayers[id] then
- WarnedPlayers[id] = {name = getName(id, true), identifiers = getAllPlayerIdentifiers(id), warns = 0}
- end
- WarnedPlayers[id].warns = WarnedPlayers[id].warns+1
- TriggerClientEvent('chat:addMessage', id, {
- template = '
{0}
',
- args = { string.format(GetLocalisedText("warned"), reason, WarnedPlayers[id].warns, maxWarnings) }, color = { 255, 255, 255 }
- })
- TriggerClientEvent("txAdminClient:warn", id, getName(src), string.format(GetLocalisedText("warned"), reason, WarnedPlayers[id].warns, maxWarnings), GetLocalisedText("warnedtitle"), GetLocalisedText("warnedby"),GetLocalisedText("warndismiss"))
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminwarnedplayer"), getName(src, false, true), getName(id, true, true), reason, WarnedPlayers[id].warns, maxWarnings), "warn", 16711680)
- if WarnedPlayers[id].warns >= maxWarnings then
- if GetConvar("ea_warnAction", "kick") == "kick" then
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminkickedplayer"), getName(src, false, true), getName(id, true, true), reason), "kick", 16711680)
- DropPlayer(id, GetLocalisedText("warnkicked"))
- WarnedPlayers[id] = nil
- elseif GetConvar("ea_warnAction", "kick") == "ban" then
- local bannedIdentifiers = CachedPlayers[id].identifiers or getAllPlayerIdentifiers(id)
- local bannedUsername = CachedPlayers[id].name or getName(id, true)
- local expires = os.time()+GetConvarInt("ea_warningBanTime", 604800)
-
- reason = GetLocalisedText("warnbanned").. string.format(GetLocalisedText("reasonadd"), CachedPlayers[id].name, getName(source, true) )
- local ban = {banid = GetFreshBanId(), name = bannedUsername,identifiers = bannedIdentifiers, banner = getName(source, true), reason = reason, expire = expires }
- updateBlacklist( ban )
-
- PrintDebugMessage("Player "..getName(source,true).." warnbanned player "..CachedPlayers[id].name.." for "..reason, 3)
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminbannedplayer"), getName(source, false, true), bannedUsername, reason, formatDateString( expires ), tostring(ban.banid) ), "ban", 16711680)
- DropPlayer(id, string.format(GetLocalisedText("banned"), reason, formatDateString( expires ) ) )
- WarnedPlayers[id] = nil
-
- end
- end
- elseif CachedPlayers[id].immune then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune"))
- end
- end)
-
- function warnPlayerExport(src, id, reason)
- if not CachedPlayers[id].immune then
- local maxWarnings = GetConvarInt("ea_maxWarnings", 3)
- if not WarnedPlayers[id] then
- WarnedPlayers[id] = {name = getName(id, true), identifiers = getAllPlayerIdentifiers(id), warns = 0}
- end
- WarnedPlayers[id].warns = WarnedPlayers[id].warns+1
- TriggerClientEvent('chat:addMessage', id, {
- template = '
{0}
',
- args = { string.format(GetLocalisedText("warned"), reason, WarnedPlayers[id].warns, maxWarnings) }, color = { 255, 255, 255 }
- })
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminwarnedplayer"), src, getName(id, true, true), reason, WarnedPlayers[id].warns, maxWarnings), "warn", 16711680)
- TriggerClientEvent("txAdminClient:warn", id, src, string.format(GetLocalisedText("warned"), reason, WarnedPlayers[id].warns, maxWarnings), GetLocalisedText("warnedtitle"), GetLocalisedText("warnedby"),GetLocalisedText("warndismiss"))
- if WarnedPlayers[id].warns >= maxWarnings then
- if GetConvar("ea_warnAction", "kick") == "kick" then
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminkickedplayer"), src, getName(id, true, true), reason), "kick", 16711680)
- DropPlayer(id, GetLocalisedText("warnkicked"))
- WarnedPlayers[id] = nil
- elseif GetConvar("ea_warnAction", "kick") == "ban" then
- local expires = os.time()+GetConvarInt("ea_warningBanTime", 604800)
- addBanExport(id, reason, formatDateString(expires), src)
- WarnedPlayers[id] = nil
- end
- end
- return true
- else
- return false
- end
- end
-
- exports('warnPlayer', warnPlayerExport)
-
- function getPlayerWarnings(playerId)
- if not WarnedPlayers[playerId] then
- return 0
- else
- return WarnedPlayers[playerId].warns
- end
- end
- exports('getPlayerWarnings', getPlayerWarnings)
-
- AddEventHandler("EasyAdmin:GetVersion", function(cb)
- cb(GetVersion())
- end)
-
- local chatEventsSupported = false
-
- pcall(function() -- this will prevent our script from erroring if the exports are missing, also mutes any errors.
- if exports.chat.registerMessageHook and exports.chat.registerMode then
- chatEventsSupported = true
- end
- end)
-
- if chatEventsSupported then
- exports.chat:registerMessageHook(function(source, outMessage, hookRef)
- if MutedPlayers[source] then
- hookRef.cancel()
- TriggerClientEvent("EasyAdmin:showNotification", source, getName(source) .. ", " .. GetLocalisedText("playermute"))
- end
- end)
- else
- AddEventHandler('chatMessage', function(source, name, msg)
- if MutedPlayers[source] then
- CancelEvent()
- TriggerClientEvent("chat:addMessage", source, { args = { "EasyAdmin", GetLocalisedText("playermute") } })
- TriggerClientEvent("EasyAdmin:showNotification", source, getName(source) .. ", " .. GetLocalisedText("playermute"))
- end
- end)
- end
-
- if GetConvar("ea_enableChat", "true") == "true" and chatEventsSupported then
- exports.chat:registerMode({
- name = "admins",
- displayName = "Admin Chat",
- color = "#19A2E3",
- seObject = "easyadmin.server.chat",
- cb = function(source, message, cbs)
- cbs.updateMessage({
- template = "^5[ADMIN CHAT]^7" .. ' {}'
- })
-
- cbs.setSeObject("easyadmin.server.chat")
- end
- })
- end
-end)
-
-Citizen.CreateThread(function()
- function HTTPRequest(url, ...)
- local err,response,headers
-
- PerformHttpRequest(url, function(e,r,h)
- err,response,headers = e,r,h
- end, ...)
- repeat
- Wait(10)
- until (response)
-
- return response
- end
- exports('HTTPRequest', HTTPRequest)
-end)
-
-Citizen.CreateThread(function()
- AddEventHandler('playerConnecting', function(playerName, setKickReason, deferrals)
- local player = source
- local numIds = getAllPlayerIdentifiers(player)
- local matchingIdentifierCount = 0
- local matchingIdentifiers = {}
- local showProgress = GetConvar("ea_presentDeferral", "true")
-
- deferrals.defer()
- Wait(0)
- local deferralText = string.format(GetLocalisedText("deferral"), 0)
- if showProgress == "false" then
- deferralText = deferralText:sub(1, -6)
- end
-
- deferrals.update(deferralText)
- PrintDebugMessage(getName(player).."'s Identifiers:\n "..table_to_string(numIds), 3)
- if not blacklist then
- print("^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^3!^1FATAL ERROR^3!^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^7\n")
- print("EasyAdmin: ^1Failed^7 to load Banlist!\n")
- print("EasyAdmin: Please check this error soon, ^1Bans *will not* work!^7\n")
- print("^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^3!^1FATAL ERROR^3!^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^7\n")
- deferrals.done("\n\nEasyAdmin: A fatal error occured, please contact a Server Administrator to resolve this issue.")
- return
- end
- Wait(0)
-
- local lastPercentage = 0
- for bi,blacklisted in ipairs(blacklist) do
- if showProgress == "true" then
- local percentage = math.round(bi/#blacklist*100)
- if bi % 12 == 0 and percentage >= lastPercentage+4 then -- only update on every 12th ban
- Wait(0)
- deferrals.update(string.format(GetLocalisedText("deferral"), percentage))
- lastPercentage = percentage
- end
- end
- for i,theId in ipairs(numIds) do
- for ci,identifier in ipairs(blacklisted.identifiers) do
- if identifier == theId and matchingIdentifiers[theId] ~= true then
- matchingIdentifierCount = matchingIdentifierCount+1
- matchingIdentifiers[theId] = true -- make sure we remember the identifier for later
- PrintDebugMessage("IDENTIFIER MATCH! "..identifier.." Required: "..matchingIdentifierCount.."/"..minimumMatchingIdentifierCount, 3)
- local notBannedIds = checkForChangedIdentifiers(numIds, blacklisted.identifiers)
- if matchingIdentifierCount >= minimumMatchingIdentifierCount then
- if #notBannedIds > 0 then
- local newBanData = blacklisted
- newBanData.identifiers = mergeTables(blacklisted.identifiers, notBannedIds) -- add newly found identifiers to the existing ban
- updateBan(blacklisted.banid,newBanData) -- send it off!
- end
- PrintDebugMessage("Connection of "..getName(player).." Declined, Banned for "..blacklist[bi].reason..", Ban ID: "..blacklist[bi].banid.."\n", 3)
- deferrals.done(string.format( GetLocalisedText("bannedjoin"), blacklist[bi].reason, formatDateString(blacklist[bi].expire), blacklist[bi].banid))
- return
- end
- end
- end
- end
- end
-
- if GetConvar("ea_enableAllowlist", "false") == "true" then
- deferrals.update(GetLocalisedText("checkingallowlist"))
- local allowlistAttempts = 0
- local allowlisted = false
- repeat
- allowlisted = DoesPlayerHavePermission(player, "player.allowlist")
- allowlistAttempts = allowlistAttempts+1
- Wait(100)
- until (allowlistAttempts >= 15 or allowlisted == true)
-
- if DoesPlayerHavePermission(player, "player.allowlist") then
- deferrals.done()
- else
- deferrals.done(GetLocalisedText("allowlist"))
- return
- end
- else
- deferrals.done()
- end
-
- end)
-end)
-
-curVersion, isMaster = GetVersion()
-local resourceName = "EasyAdmin ("..GetCurrentResourceName()..")"
-function checkVersion()
- local remoteVersion,remoteURL = getLatestVersion()
-
- if GetResourceKvpString('currentVersion') ~= curVersion then
- local legacyFiles = {
- '__resource.lua',
- 'version.json',
- 'admin_server.lua',
- 'admin_client.lua',
- 'gui_c.lua',
- 'util_shared.lua',
- 'yarn.lock',
- '.yarn.installed',
- 'server/bot/notifications.js'
- }
-
- for i,file in pairs(legacyFiles) do
- local fileExists = LoadResourceFile(GetCurrentResourceName(), file)
- if fileExists then
- os.remove(GetResourcePath(GetCurrentResourceName()).."/"..file)
- PrintDebugMessage("Found legacy file "..file.." in EasyAdmin Folder and attempted deletion.", 2)
- end
- end
-
- PrintDebugMessage('EasyAdmin has been updated, or just been installed for the first time, please restart EasyAdmin to ensure smooth operation.', 1)
-
- SetResourceKvpNoSync('currentVersion', curVersion)
- end
-
- if isMaster then
- PrintDebugMessage("You are using an unstable version of EasyAdmin, if this was not your intention, please download the latest stable version from "..remoteURL, 1)
- end
- if curVersion ~= remoteVersion and tonumber(curVersion) < tonumber(remoteVersion) then
- print("\n--------------------------------------------------------------------------")
- print("\n"..resourceName.." is outdated.\nNewest Version: "..remoteVersion.."\nYour Version: "..curVersion.."\nPlease update it from "..remoteURL)
- print("\n--------------------------------------------------------------------------")
- updateAvailable = remoteVersion
- elseif tonumber(curVersion) > tonumber(remoteVersion) then
- PrintDebugMessage("Your version of "..resourceName.." seems to be higher than the current stable version.", 2)
- end
-
- if GetResourceState("screenshot-basic") == "missing" then
- PrintDebugMessage("screenshot-basic is not installed, screenshots unavailable", 3)
- else
- StartResource("screenshot-basic")
- screenshots = true
- end
-
- local onesync = GetConvar("onesync", "off")
- if (onesync ~= "off" and onesync ~= "legacy") then
- PrintDebugMessage("Onesync is Infinity", 3)
- infinity = true
- end
-
- if GetConvar("ea_defaultKey", "none") == "none" and RedM then
- PrintDebugMessage("ea_defaultKey is not defined, EasyAdmin can only be opened using the /easyadmin command, to define a key:\nhttps://easyadmin.readthedocs.io/en/latest", 1)
- end
-
- readAcePermissions()
-end
-
-Citizen.CreateThread(function()
- repeat
- Wait(1000)
- until updateBlacklist
- while true do
- updateBlacklist()
- Wait(300000)
- end
-end)
-
--- DO NOT TOUCH THESE
--- DO NOT TOUCH THESE
--- DO NOT TOUCH THESE
--- DO NOT TOUCH THESE
-MutedPlayers = {} -- DO NOT TOUCH THIS
-OnlineAdmins = {} -- DO NOT TOUCH THIS
-ChatReminders = {} -- DO NOT TOUCH THIS
-MessageShortcuts = {} -- DO NOT TOUCH THIS
-WarnedPlayers = {} -- DO NOT TOUCH THIS
-reports = {} -- DO NOT TOUCH THIS
-FrozenPlayers = {} -- DO NOT TOUCH THIS
--- DO NOT TOUCH THESE
--- DO NOT TOUCH THESE
--- DO NOT TOUCH THESE
--- DO NOT TOUCH THESE
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/backups.lua b/server-data/resources/[esx]/EasyAdmin/server/backups.lua
deleted file mode 100644
index 0e3ab8695..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/backups.lua
+++ /dev/null
@@ -1,134 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-Citizen.CreateThread(function()
- backupInfos = LoadResourceFile(GetCurrentResourceName(), "backups/_backups.json")
-
- while true do
- repeat
- Wait(5000)
- until blacklist
- if backupInfos == nil then
- lastBackupTime = 0
- else
- backupData = json.decode(backupInfos)
- lastBackupTime = backupData.lastBackup
- end
- if (GetConvarInt("ea_backupFrequency", 72) ~= 0) and (lastBackupTime+(GetConvarInt("ea_backupFrequency", 72)*3600) < os.time()) then
- createBackup()
- end
- Wait(120000)
- end
-end)
-
-
-function loadBackupName(name)
- local backup = LoadResourceFile(GetCurrentResourceName(), "backups/"..name)
- if backup then
- local backupJson = json.decode(backup)
- if backupJson then
- PrintDebugMessage("Loading Backup..")
- for i,ban in pairs(blacklist) do
- UnbanId(ban.banid)
- PrintDebugMessage("removing ban "..ban.banid, 4)
- Wait(50)
- end
-
- for i,ban in pairs(backupJson) do
- addBan(ban)
- PrintDebugMessage("adding ban "..ban.banid, 4)
- TriggerEvent("ea_data:addBan", ban)
- Wait(50)
- end
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode(blacklist, {indent = true}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
- updateBlacklist()
- PrintDebugMessage("Backup should be loaded!")
- else
- PrintDebugMessage("^1EasyAdmin:^7 Backup Could not be loaded, in most cases this comes from there being a formatting error, please use a JSON Validator on the file and fix the errors!")
- end
-
- else
- PrintDebugMessage("^1EasyAdmin:^7 Backup Name Invalid or missing from Backups.")
- end
-end
-
-
-function createBackup()
- local backupTime = os.time()
- local backupDate = os.date("%H_%M_%d_%m_%Y")
- local backupName = "banlist_"..backupDate..".json"
- local resourceName = GetCurrentResourceName()
- PrintDebugMessage("Creating Banlist Backup to "..backupName, 3)
-
- local saved = SaveResourceFile(resourceName, "backups/"..backupName, json.encode(blacklist, {indent = true}), -1)
-
- if not saved then
- PrintDebugMessage("^1Saving banlist backup failed! Please check if EasyAdmin has Permission to write in the backups folder!^7", 1)
- end
-
- backupInfos = LoadResourceFile(resourceName, "backups/_backups.json")
- if backupInfos then
- backupData = json.decode(backupInfos)
- table.insert(backupData.backups, {id = getNewBackupid(backupData), backupFile = backupName, backupTimestamp = backupTime, backupDate = backupDate})
-
-
- if #backupData.backups > GetConvarInt("ea_maxBackupCount", 10) then
- deleteBackup(backupData,1)
- end
- backupData.lastBackup = backupTime
- SaveResourceFile(resourceName, "backups/_backups.json", json.encode(backupData, {indent = true}))
-
- else
- local backupData = {lastBackup = backupTime, backups = {}}
- table.insert(backupData.backups, {id = getNewBackupid(backupData), backupFile = backupName, backupTimestamp = backupTime, backupDate = backupDate})
- SaveResourceFile(resourceName, "backups/_backups.json", json.encode(backupData, {indent = true}))
- end
-
- return id,timestamp
-end
-
-function deleteBackup(backupData,id)
- local expiredBackup = backupData.backups[id]
- table.remove(backupData.backups, id)
-
- local backupFileName = expiredBackup.backupFile
-
- local fullResourcePath = GetResourcePath(GetCurrentResourceName())
- os.remove(fullResourcePath.."/backups/"..backupFileName)
- PrintDebugMessage("Removed Backup "..backupFileName, 3)
-
-end
-
-function getNewBackupid(backupData)
- if backupData then
- local lastBackup = backupData.lastbackup
- local backups = backupData.backups
- return #backups+1
- else
- return 0
- end
-end
-
-RegisterCommand("ea_createBackup", function(source, args, rawCommand)
- if DoesPlayerHavePermission(source, "server") then
- createBackup()
- end
-end, false)
-
-RegisterCommand("ea_loadBackup", function(source,args,rawCommand)
- if DoesPlayerHavePermission(source, "server") and args[1] then
- loadBackupName(args[1])
- end
-end,false)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/banlist.lua b/server-data/resources/[esx]/EasyAdmin/server/banlist.lua
deleted file mode 100644
index f8f0df73e..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/banlist.lua
+++ /dev/null
@@ -1,500 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-blacklist = {}
-
-RegisterServerEvent("EasyAdmin:banPlayer", function(playerId,reason,expires)
- if playerId ~= nil then
- if (DoesPlayerHavePermission(source, "player.ban.temporary") or DoesPlayerHavePermission(source, "player.ban.permanent")) and CachedPlayers[playerId] and not CachedPlayers[playerId].immune then
- local bannedIdentifiers = CachedPlayers[playerId].identifiers or getAllPlayerIdentifiers(playerId)
- local username = CachedPlayers[playerId].name or getName(playerId, true)
- if expires and expires < os.time() then
- expires = os.time()+expires
- elseif not expires then
- expires = 10444633200
- end
- if expires >= 10444633200 and not DoesPlayerHavePermission(source, "player.ban.permanent") then
- return false
- end
-
- reason = formatShortcuts(reason).. string.format(GetLocalisedText("reasonadd"), CachedPlayers[playerId].name, getName(source) )
- local ban = {banid = GetFreshBanId(), name = username,identifiers = bannedIdentifiers, banner = getName(source, true), reason = reason, expire = expires, expireString = formatDateString(expires) }
- updateBlacklist( ban )
- PrintDebugMessage("Player "..getName(source,true).." banned player "..CachedPlayers[playerId].name.." for "..reason, 3)
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminbannedplayer"), getName(source, false, true), CachedPlayers[playerId].name, reason, formatDateString( expires ), tostring(ban.banid) ), "ban", 16711680)
- DropPlayer(playerId, string.format(GetLocalisedText("banned"), reason, formatDateString( expires ) ) )
- elseif CachedPlayers[playerId].immune then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune"))
- end
- end
-end)
-
-RegisterServerEvent("EasyAdmin:offlinebanPlayer", function(playerId,reason,expires)
- if playerId ~= nil and not CachedPlayers[playerId].immune then
- if (DoesPlayerHavePermission(source, "player.ban.temporary") or DoesPlayerHavePermission(source, "player.ban.permanent")) and not CachedPlayers[playerId].immune then
- local bannedIdentifiers = CachedPlayers[playerId].identifiers or getAllPlayerIdentifiers(playerId)
- local username = CachedPlayers[playerId].name or getName(playerId, true)
- if expires and expires < os.time() then
- expires = os.time()+expires
- elseif not expires then
- expires = 10444633200
- end
- if expires >= 10444633200 and not DoesPlayerHavePermission(source, "player.ban.permanent") then
- return false
- end
-
- reason = formatShortcuts(reason).. string.format(GetLocalisedText("reasonadd"), CachedPlayers[playerId].name, getName(source) )
- local ban = {banid = GetFreshBanId(), name = username,identifiers = bannedIdentifiers, banner = getName(source), reason = reason, expire = expires }
- updateBlacklist( ban )
- PrintDebugMessage("Player "..getName(source,true).." offline banned player "..CachedPlayers[playerId].name.." for "..reason, 3)
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminofflinebannedplayer"), getName(source, false, true), CachedPlayers[playerId].name, reason, formatDateString( expires ) ), "ban", 16711680)
- end
- elseif CachedPlayers[playerId].immune then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("adminimmune"))
- end
-end)
-
-AddEventHandler('banCheater', function(playerId,reason)
- Citizen.Trace("^1EasyAdmin^7: the banCheater event is ^1deprecated^7 and has been removed! Please adjust your ^3"..GetInvokingResource().."^7 Resource to use EasyAdmin:addBan instead.")
-end)
-
-
-function addBanExport(playerId,reason,expires,banner)
- local bannedIdentifiers = {}
- local bannedUsername = "Unknown"
- if type(playerId) == "table" then -- if playerId is a table of identifiers
- offline = true
- bannedIdentifiers = playerId
- elseif CachedPlayers[playerId] then
- if CachedPlayers[playerId].dropped then
- offline = true
- end
- if CachedPlayers[playerId].immune then
- return false
- end
- bannedIdentifiers = CachedPlayers[playerId].identifiers
- bannedUsername = CachedPlayers[playerId].name or getName(playerId, true)
- else
- PrintDebugMessage("Couldn't find any Infos about Player "..playerId..", no ban issued.", 1)
- return false
- end
-
-
- if expires and expires < os.time() then
- expires = os.time()+expires
- elseif not expires then
- expires = 10444633200
- end
- reason = formatShortcuts(reason).. string.format(GetLocalisedText("reasonadd"), getName(tostring(playerId) or "?"), banner or "Unknown" )
- local ban = {banid = GetFreshBanId(), name = bannedUsername,identifiers = bannedIdentifiers, banner = banner or "Unknown", reason = reason, expire = expires, expireString = formatDateString(expires) }
- updateBlacklist( ban )
-
- if source then
- PrintDebugMessage("Player "..getName(source,true).." added ban "..reason, 3)
- end
-
-
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminbannedplayer"), banner or "Unknown", getName(tostring(playerId) or "?", false, true), reason, formatDateString( expires ), tostring(ban.banid) ), "ban", 16711680)
- if not offline then
- DropPlayer(playerId, string.format(GetLocalisedText("banned"), reason, formatDateString( expires ) ) )
- end
- return ban
-end
-exports('addBan', addBanExport)
-AddEventHandler("EasyAdmin:addBan", addBanExport)
-
-RegisterServerEvent("EasyAdmin:updateBanlist", function(playerId)
- local src = source
- if DoesPlayerHavePermission(source, "player.ban.view") then
- updateBlacklist(false,true)
- Citizen.Wait(300)
- TriggerLatentClientEvent("EasyAdmin:fillBanlist", src, 100000, blacklist)
- PrintDebugMessage("Banlist Refreshed by "..getName(src,true), 3)
- end
-end)
-
-RegisterServerEvent("EasyAdmin:requestBanlist", function()
- local src = source
- if DoesPlayerHavePermission(source, "player.ban.view") then
- TriggerLatentClientEvent("EasyAdmin:fillBanlist", src, 100000, blacklist)
- PrintDebugMessage("Banlist Requested by "..getName(src,true), 3)
- end
-end)
-
-RegisterCommand("unban", function(source, args, rawCommand)
- if args[1] and DoesPlayerHavePermission(source, "player.ban.remove") then
- PrintDebugMessage("Player "..getName(source,true).." Unbanned "..args[1], 3)
- if tonumber(args[1]) then
- UnbanId(tonumber(args[1]))
- else
- UnbanIdentifier(args[1])
- end
- if (source ~= 0) then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("done"))
- else
- Citizen.Trace(GetLocalisedText("done"))
- end
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminunbannedplayer"), getName(source, false, true), args[1], "Unbanned via Command"), "ban", 16711680)
- end
-end, false)
-
-
-RegisterServerEvent("EasyAdmin:editBan", function(ban)
- if DoesPlayerHavePermission(source, "player.ban.edit") then
- updateBan(ban.banid,ban)
- -- TODO Webhook
- end
-end)
-
-function unbanPlayer(banId)
- local thisBan = nil
- for i,ban in ipairs(blacklist) do
- if ban.banid == banId then
- thisBan = ban
- break
- end
- end
- if thisBan == nil then
- return false
- end
- UnbanId(banId)
- return true
-end
-exports('unbanPlayer', unbanPlayer)
-
-
-function fetchBan(banId)
- for i,ban in ipairs(blacklist) do
- if ban.banid == banId then
- return ban
- end
- end
- return false
-end
-exports('fetchBan', fetchBan)
-
-RegisterServerEvent("EasyAdmin:unbanPlayer", function(banId)
- if DoesPlayerHavePermission(source, "player.ban.remove") then
- local thisBan = fetchBan(banId)
- local ret = unbanPlayer(banId)
- if ret then
- PrintDebugMessage("Player "..getName(source,true).." unbanned "..banId, 3)
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminunbannedplayer"), getName(source, false, true), banId, thisBan.reason), "ban", 16711680)
- end
- end
-end)
-
-function GetFreshBanId()
- if blacklist[#blacklist] then
- return blacklist[#blacklist].banid+1
- else
- return 1
- end
-end
-exports('GetFreshBanId', GetFreshBanId)
-
-
-RegisterCommand("convertbanlist", function(source, args, rawCommand)
- if GetConvar("ea_custombanlist", "false") == "true" then
- local content = LoadResourceFile(GetCurrentResourceName(), "banlist.json")
- local ob = json.decode(content)
- for i,theBan in ipairs(ob) do
- TriggerEvent("ea_data:addBan", theBan)
- print("processed ban: "..i.."\n")
- end
- content=nil
- else
- print("Custom Banlist is not enabled, converting back to json.")
- TriggerEvent('ea_data:retrieveBanlist', function(banlist)
- blacklist = banlist
- for i,theBan in ipairs(blacklist) do
- if not theBan.identifiers then theBan.identifiers = {} end
- if theBan.steam then
- table.insert(theBan.identifiers, theBan.steam)
- theBan.steam=nil
- end
- if theBan.identifier then
- table.insert(theBan.identifiers, theBan.identifier)
- theBan.identifier=nil
- end
- if theBan.discord then
- table.insert(theBan.identifiers, theBan.discord)
- theBan.discord=nil
- end
- end
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode(blacklist, {indent = true}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
- end)
- end
-end, true)
-
-function updateBan(id,newData)
- if id and newData and newData.identifiers and newData.banid and newData.reason and newData.expire then
- for i, ban in pairs(blacklist) do
- if ban.banid == newData.banid then
- blacklist[i] = newData
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode(blacklist, {indent = true}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
- if GetConvar("ea_custombanlist", "false") == "true" then
- TriggerEvent("ea_data:updateBan", newData)
- end
- break
- end
- end
- end
-end
-
-
-function addBan(data)
- if data then
- table.insert(blacklist, data)
- end
-end
-
-
-
-function updateBlacklist(data,remove, forceChange)
- local change = (forceChange or false) --mark if file was changed to save up on disk writes.
- if GetConvar("ea_custombanlist", "false") == "true" then
- PrintDebugMessage("You are using a Custom Banlist System, this is ^3not currently supported^7 and WILL cause issues! Only use this if you know what you are doing, otherwise, disable ea_custombanlist.", 1)
- if data and not remove then
- addBan(data)
- TriggerEvent("ea_data:addBan", data)
-
- elseif data and remove then
- UnbanId(data.banid)
- elseif not data then
- TriggerEvent('ea_data:retrieveBanlist', function(banlist)
- blacklist = banlist
- PrintDebugMessage("updated banlist custom banlist", 4)
- for i,theBan in ipairs(blacklist) do
- if theBan.expire < os.time() then
- table.remove(blacklist,i)
- PrintDebugMessage("removing old ban custom banlist", 4)
- TriggerEvent("ea_data:removeBan", theBan)
- end
- end
- end)
- end
- return
- end
-
- local content = LoadResourceFile(GetCurrentResourceName(), "banlist.json")
- if not content then
- PrintDebugMessage("banlist.json file was missing, we created a new one.", 2)
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode({}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
- content = json.encode({})
- end
- blacklist = json.decode(content)
-
- if not blacklist then
- PrintDebugMessage("^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^3!^1FATAL ERROR^3!^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^7\n")
- PrintDebugMessage("^1Failed^7 to load Banlist!\n")
- PrintDebugMessage("Please check your banlist file for errors, ^1Bans *will not* work!^7\n")
- PrintDebugMessage("^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^4-^5-^6-^8-^9-^1-^2-^3-^3!^1FATAL ERROR^3!^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^1-^9-^8-^6-^5-^4-^3-^2-^7\n")
- return
- end
-
- upgraded = performBanlistUpgrades(blacklist)
- if upgraded then change = true end
-
- if data and not remove then
- addBan(data)
- PrintDebugMessage("Added the following data to banlist:\n"..table_to_string(data), 4)
- change=true
- elseif not data then
- for i,theBan in ipairs(blacklist) do
- theBan.id = nil
- if not theBan.banid then
- if i==1 then
- theBan.banid = 1
- else
- theBan.banid = blacklist[i].banid or i
- end
- PrintDebugMessage("Ban "..theBan.banid.." did not have an ID, assigned one.", 4)
- change=true
- end
- if not theBan.expire then
- PrintDebugMessage("Ban "..theBan.banid.." did not have an expiry time, removing..", 4)
- table.remove(blacklist,i)
- change=true
- elseif not theBan.identifiers then -- make sure 1 identifier is given, otherwise its a broken ban
- PrintDebugMessage("Ban "..theBan.banid.." did not have any identifiers, removing..", 4)
- table.remove(blacklist,i)
- change=true
- elseif not theBan.identifiers[1] then
- PrintDebugMessage("Ban "..theBan.banid.." did not have one identifier, removing..", 4)
- table.remove(blacklist,i)
- change=true
- elseif theBan.expire < os.time() then
- PrintDebugMessage("Ban "..theBan.banid.." expired, removing..", 4)
- table.remove(blacklist,i)
- change=true
- elseif theBan.expire == 1924300800 then
- PrintDebugMessage("Ban "..theBan.banid.." had legacy expiry time, we fixed it", 4)
- blacklist[i].expire = 10444633200
- change=true
- end
- end
- end
- if data and remove then
- PrintDebugMessage("Removed the following data from banlist:\n"..table_to_string(data), 4)
- UnbanId(data.banid)
- change = true
- end
- if change then
- PrintDebugMessage("Banlist changed, saving..", 4)
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode(blacklist, {indent = true}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
- end
- PrintDebugMessage("Completed Banlist Update.", 4)
-end
-
-function BanIdentifier(identifier,reason)
- updateBlacklist( {identifiers = {identifier} , banner = "Unknown", reason = reason, expire = 10444633200} )
-end
-
-function BanIdentifiers(identifier,reason)
- updateBlacklist( {identifiers = identifier , banner = "Unknown", reason = reason, expire = 10444633200} )
-end
-
-function UnbanIdentifier(identifier)
- if identifier then
- for i,ban in pairs(blacklist) do
- for index,id in pairs(ban.identifiers) do
- if identifier == id then
- table.remove(blacklist,i)
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode(blacklist, {indent = true}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
-
- if GetConvar("ea_custombanlist", "false") == "true" then
- TriggerEvent("ea_data:removeBan", ban)
- end
- PrintDebugMessage("removed ban as per unbanidentifier func", 4)
- return
- end
- end
- end
- end
-end
-
-function UnbanId(id)
- for i,ban in pairs(blacklist) do
- if ban.banid == id then
- table.remove(blacklist,i)
- local saved = SaveResourceFile(GetCurrentResourceName(), "banlist.json", json.encode(blacklist, {indent = true}), -1)
- if not saved then
- PrintDebugMessage("^1Saving banlist.json failed! Please check if EasyAdmin has Permission to write in its own folder!^7", 1)
- end
-
- if GetConvar("ea_custombanlist", "false") == "true" then
- TriggerEvent("ea_data:removeBan", ban)
- end
- end
- end
-end
-
-function performBanlistUpgrades()
- local upgraded = false
-
- local takenIds = {}
- for i,b in pairs(blacklist) do
- if takenIds[b.banid] then
- local freshId = GetFreshBanId()
- PrintDebugMessage("ID "..b.banid.." was assigned twice, reassigned to "..freshId, 4)
- blacklist[i].banid = freshId
- upgraded = true
- end
- takenIds[b.banid] = true
- end
- takenIds=nil
-
- for i,ban in pairs(blacklist) do
- if type(i) == "string" then
- PrintDebugMessage("Ban "..ban.banid.." had a string as indice, fixed it.", 4)
- blacklist[i] = nil
- table.insert(blacklist,ban)
- upgraded = true
- end
- end
- for i,ban in ipairs(blacklist) do
- if ban.identifiers then
- for k, identifier in pairs(ban.identifiers) do
- if identifier == "" then
- PrintDebugMessage("Ban "..ban.banid.." had an empty identifier, removed it.", 4)
- ban.identifiers[k] = nil
- upgraded = true
- end
- end
- end
- if not ban.expireString then
- upgraded = true
- ban.expireString = formatDateString(ban.expire)
- end
- end
- if blacklist[1] and (blacklist[1].identifier or blacklist[1].steam or blacklist[1].discord) then
- Citizen.Trace("Upgrading Banlist...\n", 4)
- for i,ban in ipairs(blacklist) do
- if not ban.identifiers then
- ban.identifiers = {}
- PrintDebugMessage("Ban "..ban.banid.." had no identifiers, added one.", 4)
- upgraded=true
- end
- if ban.identifier then
- table.insert(ban.identifiers, ban.identifier)
- PrintDebugMessage("Ban "..ban.banid.." had identifier, converted to identifiers table", 4)
- ban.identifier = nil
- upgraded=true
- end
- if ban.steam then
- table.insert(ban.identifiers, ban.steam)
- PrintDebugMessage("Ban "..ban.banid.." had seperate steam identifier, converted to identifiers table", 4)
- ban.steam = nil
- upgraded=true
- end
- if ban.discord and ban.discord ~= "" then
- table.insert(ban.identifiers, ban.discord)
- PrintDebugMessage("Ban "..ban.banid.." had seperate discord identifier, converted to identifiers table", 4)
- ban.discord = nil
- upgraded=true
- end
- end
- Citizen.Trace("Banlist Upgraded.\n", 4)
- end
- return upgraded
-end
-
-
-
-function IsIdentifierBanned(theIdentifier)
- local identifierfound = false
- for index,value in ipairs(blacklist) do
- for i,identifier in ipairs(value.identifiers) do
- if theIdentifier == identifier then
- identifierfound = true
- end
- end
- end
- return identifierfound
-end
-exports('IsIdentifierBanned', IsIdentifierBanned)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/bot.js b/server-data/resources/[esx]/EasyAdmin/server/bot/bot.js
deleted file mode 100644
index 918d866a2..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/bot.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/*eslint no-global-assign: "off", no-unused-vars: "off"*/
-process.on('uncaughtException', function(err) {
- console.log('Caught exception: ', err.stack)
-})
-process.on('unhandledRejection', function(err) {
- console.log('Caught exception: ', err.stack)
-})
-
-AsciiTable = require('ascii-table')
-sprintf = require('sprintf-js').sprintf
-juration = require('juration')
-const prettyMilliseconds = require('pretty-ms')
-const { Client, EmbedBuilder, Collection, Intents, Partials, ButtonStyle, ActionRowBuilder, ButtonBuilder, SelectMenuBuilder, Guild, Util, ModalBuilder, TextInputBuilder, GatewayIntentBits, InteractionType, TextInputStyle } = require('discord.js')
-
-const { SlashCommandBuilder } = require('@discordjs/builders')
-
-
-client = new Client({
- partials: [Partials.GuildMember, Partials.User, Partials.Message, Partials.Channel, Partials.Reaction],
- intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.MessageContent]
-})
-client.commands = new Collection()
-
-
-async function RegisterClientCommands(clientId) {
- const { REST } = require('@discordjs/rest')
- const { Routes } = require('discord-api-types/v10')
- const fs = require('fs')
-
- const commands = []
- const commandFiles = fs.readdirSync(`${resourcePath}/server/bot/commands`).filter(file => file.endsWith('.js'))
-
-
- for (const file of commandFiles) {
- const command = require(`${resourcePath}/server/bot/commands/${file}`)
- commands.push(command.data.toJSON())
- client.commands.set(command.data.name, command)
- }
-
- const rest = new REST({ version: '10' }).setToken(GetConvar('ea_botToken', ''))
-
- // compat: remove existing commands for homeguild
- if (guild != '') {
- rest.put(Routes.applicationGuildCommands(clientId, guild), { body: {} })
- }
- await rest.put(
- Routes.applicationCommands(clientId),
- { body: commands },
- )
-
- client.on('interactionCreate', async interaction => {
- if (interaction.type != InteractionType.ApplicationCommand) return
-
- const command = client.commands.get(interaction.commandName)
-
- if (!command) return
-
- if (!(await DoesGuildMemberHavePermission(interaction.member, `bot.${command.data.name}`) == true) && !(command.data.name == 'refreshperms')) {
- await refreshRolesForMember(interaction.member)
- if (!(await DoesGuildMemberHavePermission(interaction.member, `bot.${command.data.name}`) == true)) {
- await interaction.reply({ content: 'You don\'t have permission to run this command!', ephemeral: true })
- return false
- }
- }
- try {
- await command.execute(interaction, exports) // we need to pass exports here, otherwise we won't be able to access them inside the command
- } catch (error) {
- console.error(error)
- var errorContent = { content: `There was an error while executing this command, please report the following stack trace here: \`\`\`js\n${error.stack}\`\`\``, ephemeral: true }
- if (interaction.replied) {
- interaction.followUp(errorContent)
-
- } else {
- interaction.reply(errorContent)
- }
- }
- })
-}
-
-if (GetConvar('ea_botToken', '') != '') {
-
- client.on('ready', async () => {
- console.log(`Logged in as ${client.user.tag}!`)
- client.user.setPresence({ activities: [{ name: `${GetConvar('sv_projectName', GetConvar('sv_hostname', 'default FXServer'))}`, type: 'WATCHING' }], status: 'online' })
- userID = client.user.id
- resourcePath = GetResourcePath(GetCurrentResourceName()) // absolute resource path, needed for FS
- guild = GetConvar('ea_botGuild', '')
-
- EasyAdmin = GetCurrentResourceName() // fetch our Resource name and claim we're called EasyAdmin, this just makes exports easier.
-
- currentVersion = await exports[EasyAdmin].GetVersion()[0]
- latestVersionInfo = await exports[EasyAdmin].getLatestVersion()
-
-
- RegisterClientCommands(client.user.id)
- var startupMessage = `**EasyAdmin ${currentVersion}** has started.`
- if (currentVersion != latestVersionInfo[0]) {
- startupMessage+=`\nVersion ${latestVersionInfo[0]} is Available!\n Download it from ${latestVersionInfo[1]}`
- }
- LogDiscordMessage(startupMessage, 'startup')
- })
-
- client.on('debug', function(info){
- if (GetConvarInt('ea_logLevel', 1) >= 4 ) {
- console.log(`${info}`)
- }
- })
- on('debug', function(info){
- if (GetConvarInt('ea_logLevel', 1) >= 4 ) {
- console.log(`${info}`)
- }
- })
-
- client.login(GetConvar('ea_botToken', ''))
-}
-
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/chat_bridge.js b/server-data/resources/[esx]/EasyAdmin/server/bot/chat_bridge.js
deleted file mode 100644
index acea07b96..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/chat_bridge.js
+++ /dev/null
@@ -1,84 +0,0 @@
-
-try {
-
- knownAvatars = {}
-
-
- exports['chat'].registerMessageHook(async function(source, outMessage) {
-
- if (GetConvar('ea_botChatBridge', '') == '') { return }
-
- const user = await exports[EasyAdmin].getCachedPlayer(source)
-
- if (!user) {
- return // chat message wasnt sent by a user, we don't care.
- }
-
-
- var userInfo = {name: outMessage.args[0]}
-
- if (knownAvatars[source] == undefined) {
- var fivemAccount = false
- for (let identifier of user.identifiers) {
- if (identifier.search('fivem:') != -1) {
- fivemAccount = identifier.substring(identifier.indexOf(':') + 1)
- }
- }
-
- if (fivemAccount) {
- var response = await exports[EasyAdmin].HTTPRequest(`https://policy-live.fivem.net/api/getUserInfo/${fivemAccount}`)
- try {
- response = JSON.parse(response)
- if (response.avatar_template) {
- var avatarURL = response.avatar_template.replace('{size}', '96')
- if (avatarURL.indexOf('http') == -1) {
- avatarURL = `https://forum.cfx.re${avatarURL}`
- }
- userInfo.iconURL = avatarURL
- knownAvatars[source] = avatarURL // we dont need to resolve the avatar every time.
- } else {
- knownAvatars[source] = false // avatar missing.
- }
- } catch {
- knownAvatars[source] = false // something broke while trying to get discourse avatar, dont try again.
-
- }
- } else {
- knownAvatars[source] = false // no fivem identifier
- }
- } else {
- userInfo.iconURL = knownAvatars[source]
- }
- if (knownAvatars[source] == false) {
- userInfo.iconURL = undefined // dont send anything to discord, assume something went wrong
- }
-
- var embed = await prepareGenericEmbed(undefined, undefined, 55555, undefined, undefined, userInfo, outMessage.args[1], false)
- client.channels.cache.get(GetConvar('ea_botChatBridge', '')).send({ embeds: [embed] })
- })
-
-
-} catch(error) {
- if (GetConvar('ea_botChatBridge', '') != '') {
- console.error('Registering Chat Bridge failed, you will need to update your chat resource from https://github.com/citizenfx/cfx-server-data to use it.')
- }
-}
-
-client.on('messageCreate', async msg => {
- if (GetConvar('ea_botChatBridge', '') == '') { return }
- if (!msg.member || msg.author.bot) { return } // message-sender is a webhook
- if(msg.author.id == userID) {
- return
- }
- if(!msg.channel) { return }
- if (msg.channel.id == GetConvar('ea_botChatBridge', '')) {
- exports['chat'].addMessage(-1, { args: [msg.member.user.tag, msg.cleanContent]})
- }
-
-})
-
-on('playerDropped', () => {
- if (GetConvar('ea_botChatBridge', '') == '') { return }
- knownAvatars[global.source] = undefined
-})
-
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/add_ace.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/add_ace.js
deleted file mode 100644
index 93e0c4ad8..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/add_ace.js
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('add_ace')
- .setDescription('Adds a permission to a group, saves into easyadmin_permissions.cfg'),
- async execute(interaction, exports) {
- var timestamp = Date.now()
-
- const modal = new ModalBuilder()
- .setCustomId('addaceModal'+timestamp)
- .setTitle('Add ACE')
-
- const groupName = new TextInputBuilder()
- .setCustomId('groupName')
- .setLabel('Group Name')
- .setStyle(TextInputStyle.Short)
- .setRequired(true)
- .setMaxLength(120)
- .setPlaceholder('group.admin')
-
- const permission = new TextInputBuilder()
- .setCustomId('permission')
- // The label is the prompt the user sees for this input
- .setLabel('Permission')
- // Short means only a single line of text
- .setStyle(TextInputStyle.Short)
- .setRequired(true)
- .setMaxLength(120)
- .setPlaceholder('easyadmin.bot.playerlist')
-
- const firstActionRow = new ActionRowBuilder().addComponents(groupName)
- const secondActionRow = new ActionRowBuilder().addComponents(permission)
-
- modal.addComponents(firstActionRow, secondActionRow)
-
- interaction.showModal(modal)
-
- const filter = (interaction) => interaction.customId === 'addaceModal'+timestamp
- interaction.awaitModalSubmit({ filter, time: 120000 })
- .then(async (interaction) => {
- var group = interaction.fields.getTextInputValue('groupName')
- var permission = interaction.fields.getTextInputValue('permission')
- var query = `add_ace ${group} ${permission} allow`
- exports[EasyAdmin].AddToFile('easyadmin_permissions.cfg', query)
-
- ExecuteCommand(query)
-
- interaction.reply(`\`${query}\` has been executed and saved.`)
-
- }).catch(async () => {}) // silently catch error, happens if the form times out
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/add_group.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/add_group.js
deleted file mode 100644
index 7ebbb9631..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/add_group.js
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('add_group')
- .setDescription('Adds a group to a User (ACE), saves into easyadmin_permissions.cfg')
- .addUserOption(option =>
- option.setName('user')
- .setDescription('The user')
- .setRequired(true))
- .addStringOption(option =>
- option.setName('group')
- .setDescription('the group, for example, group.admin')
- .setRequired(true)),
- async execute(interaction, exports) {
- const user = interaction.options.getUser('user').id
- const groupName = interaction.options.getString('group')
-
-
- var query = `add_principal identifier.discord:${user} ${groupName}`
- exports[EasyAdmin].AddToFile('easyadmin_permissions.cfg', query)
-
- ExecuteCommand(query)
-
- interaction.reply(`\`${query}\` has been executed and saved.`)
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/announce.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/announce.js
deleted file mode 100644
index da487f414..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/announce.js
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('announce')
- .setDescription('send a announcement to the server')
- .addStringOption(option =>
- option.setName('reason')
- .setDescription('Reason Text')
- .setRequired(true)),
- async execute(interaction, exports) {
- var reason = exports[EasyAdmin].formatShortcuts(interaction.options.getString('reason'))
-
- var ret = await exports[EasyAdmin].announce(reason)
- if (ret) {
- let embed = await prepareGenericEmbed(`Succesfully sent an announcement \nreason: ${reason}`)
- await interaction.reply({embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed('Could not send an annoucement.')
- await interaction.reply({embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/ban.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/ban.js
deleted file mode 100644
index 98a5c0c01..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/ban.js
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('ban')
- .setDescription('bans a User')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true))
- .addStringOption(option =>
- option.setName('reason')
- .setDescription('Reason Text')
- .setRequired(true))
- .addStringOption(option =>
- option.setName('timeframe')
- .setDescription('The timeframe in a human readable format (30 mins, 1 hour, 2 weeks, or permanent)')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
- const reason = exports[EasyAdmin].formatShortcuts(interaction.options.getString('reason'))
- const timeframe = exports[EasyAdmin].formatShortcuts(interaction.options.getString('timeframe'))
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var banTime
-
- try {
- if (timeframe.toLowerCase() == 'permanent') {
- banTime = 10444633200
- } else {
- banTime = await juration.parse(timeframe)
- if (banTime > 10444633200) {
- banTime = 10444633200
- }
- }
- } catch (error) {
- console.error(error)
- interaction.reply({ content: 'Sorry, i couldn\'t understand the timeframe you provided.', ephemeral: true })
- return
- }
-
-
- if (banTime < 10444633200 && !await DoesGuildMemberHavePermission(interaction.member, 'player.ban.temporary')) {
- interaction.reply({ content: 'Insufficient Permissions, you need `easyadmin.player.ban.temporary`.', ephemeral: true })
- return
- } else if (banTime > 10444633200 && !await DoesGuildMemberHavePermission(interaction.member, 'player.ban.permanent')) {
- interaction.reply({ content: 'Insufficient Permissions, you need `easyadmin.player.ban.permanent`.', ephemeral: true })
- return
- }
-
- var ban = exports[EasyAdmin].addBan(user.id, reason, banTime, interaction.user.tag)
- if (ban) {
- let embed = await prepareGenericEmbed(`Successfully banned **${user.name}** for **${reason}** until ${ban.expireString} [#${ban.banid}.`)
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Failed banning **${user.name}**.`)
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/baninfo.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/baninfo.js
deleted file mode 100644
index cadc431eb..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/baninfo.js
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('baninfo')
- .setDescription('Shows details of a ban')
- .addIntegerOption(option =>
- option.setName('banid')
- .setDescription('Ban ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const banId = interaction.options.getInteger('banid')
-
- var ban = await exports[EasyAdmin].fetchBan(banId)
- if (ban) {
- let embed = new EmbedBuilder()
- .setColor(16777214)
- .setTimestamp()
-
- var discordAccount = false
- for (let identifier of ban.identifiers) {
- if (identifier.search('discord:') != -1) {
- discordAccount = await client.users.fetch(identifier.substring(identifier.indexOf(':') + 1))
- }
- }
-
- embed.addFields([
- { name: 'Ban Info', value: `Ban infos for **#${banId}**`},
- { name: 'Username', value: `\`\`\`${ban.name}\`\`\``, inline: true}
- ])
-
- if (discordAccount) {
- embed.addFields([{ name: 'Discord Account', value: `\`\`\`${discordAccount.tag}\`\`\``, inline: true}])
- embed.setThumbnail(discordAccount.avatarURL())
- }
- embed.addFields([
- { name: 'Banned by', value: `\`\`\`${ban.banner}\`\`\``, inline: true},
- { name: 'Reason', value: `\`\`\`\n${ban.reason}\`\`\``, inline: false},
- { name: 'Expires', value: `\`\`\`${ban.expireString}\`\`\``, inline: true}
- ])
-
-
- interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed('No ban was found with this ID.')
- interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/cleanup.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/cleanup.js
deleted file mode 100644
index afbb4d046..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/cleanup.js
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('cleanup')
- .setDescription('Cleans up area of type')
- .addStringOption(option =>
- option.setName('type')
- .setDescription('Type of Entity to clean up.')
- .setRequired(true)
- .addChoices(
- {name:'Vehicles', value:'cars'},
- {name:'Peds', value:'peds'},
- {name:'Props', value:'props'})),
-
- async execute(interaction, exports) {
- const type = interaction.options.getString('type')
-
- var ret = exports[EasyAdmin].cleanupArea(type)
-
- if (ret) {
- let embed = await prepareGenericEmbed(`Cleaned up **${type}**.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Could not cleanup **${type}**.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/configure.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/configure.js
deleted file mode 100644
index 0e37e11ec..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/configure.js
+++ /dev/null
@@ -1,122 +0,0 @@
-
-async function configForward(interaction, exports) {
- var embed = await prepareGenericEmbed('Alright! Now please write the type of log to forward (see for examples)')
-
-
- if (!interaction.replied) {
- await interaction.reply({ embeds: [embed]})
- } else {
- await interaction.followUp({ embeds: [embed]})
- }
-
- const filter = m => m.author.id == interaction.member.id && m.channel.id == interaction.channel.id
- const collector = interaction.channel.createMessageCollector({ filter, time: 10000, max: 1 })
-
- collector.on('collect', async m => {
- await m.fetch()
- let embed = await prepareGenericEmbed(`Great! Now please tag the channel you want me to log this in (like this: <#${interaction.channel.id}>).`)
-
-
- await interaction.followUp({ embeds: [embed]})
- const filter = m => m.author.id == interaction.member.id && m.channel.id == interaction.channel.id
- const collector = interaction.channel.createMessageCollector({ filter, time: 10000, max: 1 })
-
- collector.on('collect', async message => {
- await message.fetch()
- let channel = message.mentions.channels.first().id
-
- exports[EasyAdmin].RemoveFromFile('easyadmin_permissions.cfg', `ea_addBotLogForwarding ${m.cleanContent}`, true)
-
- exports[EasyAdmin].AddToFile('easyadmin_permissions.cfg', `ea_addBotLogForwarding ${m.cleanContent} ${channel}`)
-
-
- addBotLogForwarding('', [m.cleanContent, channel])
- interaction.followUp('Done! Result has been saved into `easyadmin_permissions.cfg`.')
- })
-
- })
-}
-
-
-async function configBridge(interaction, exports) {
- var embed = await prepareGenericEmbed(`Alright! Please tag the channel you want me to bridge (like this: <#${interaction.channel.id}>).`)
-
-
- if (!interaction.replied) {
- await interaction.reply({ embeds: [embed]})
- } else {
- await interaction.followUp({ embeds: [embed]})
- }
-
- const filter = m => m.author.id == interaction.member.id && m.channel.id == interaction.channel.id
- const collector = interaction.channel.createMessageCollector({ filter, time: 10000, max: 1 })
-
- collector.on('collect', async m => {
- await m.fetch()
- let channel = m.mentions.channels.first().id
-
- exports[EasyAdmin].RemoveFromFile('easyadmin_permissions.cfg', 'set ea_botChatBridge', true)
-
- exports[EasyAdmin].AddToFile('easyadmin_permissions.cfg', `set ea_botChatBridge ${channel}`)
-
- SetConvar('ea_botChatBridge', `${channel}`)
-
- interaction.followUp('Done! Result has been saved into `easyadmin_permissions.cfg`.')
-
- })
-}
-
-async function configLiveStatus(interaction, exports) {
- var embed = await prepareGenericEmbed(`Alright! Please tag the channel you want me to post the live status in, make sure its empty and that normal people can't write there! (like this: <#${interaction.channel.id}>).`)
-
-
- if (!interaction.replied) {
- await interaction.reply({ embeds: [embed]})
- } else {
- await interaction.followUp({ embeds: [embed]})
- }
-
- const filter = m => m.author.id == interaction.member.id && m.channel.id == interaction.channel.id
- const collector = interaction.channel.createMessageCollector({ filter, time: 10000, max: 1 })
-
- collector.on('collect', async m => {
- await m.fetch()
- let channel = m.mentions.channels.first().id
-
- exports[EasyAdmin].RemoveFromFile('easyadmin_permissions.cfg', 'set ea_botStatusChannel', true)
-
- exports[EasyAdmin].AddToFile('easyadmin_permissions.cfg', `set ea_botStatusChannel ${channel}`)
-
- SetConvar('ea_botStatusChannel', `${channel}`)
-
- interaction.followUp('Done! Result has been saved into `easyadmin_permissions.cfg`.')
-
- })
-}
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('configure')
- .setDescription('Configure various easyadmin features')
- .addStringOption(option =>
- option.setName('setting')
- .setDescription('The setting to change')
- .setRequired(true)
- .addChoices(
- {name:'Log Forwarding', value: 'logfwd'},
- {name:'Chat Bridge', value: 'chatbridge'},
- {name:'Live Server Status', value: 'serverstatus'}
- )),
- async execute(interaction, exports) {
- const setting = interaction.options.getString('setting')
-
-
- if (setting == 'logfwd') {
- configForward(interaction, exports)
- } else if (setting == 'chatbridge') {
- configBridge(interaction, exports)
- } else if (setting == 'serverstatus') {
- configLiveStatus(interaction, exports)
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/freeze.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/freeze.js
deleted file mode 100644
index 8bed3f5b1..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/freeze.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('freeze')
- .setDescription('Freezes player')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var ret = await exports[EasyAdmin].freezePlayer(user.id, true)
-
- if (ret) {
- let embed = await prepareGenericEmbed(`Successfully froze **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Could not freeze **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/kick.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/kick.js
deleted file mode 100644
index b315d0996..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/kick.js
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('kick')
- .setDescription('Kicks a User')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true))
- .addStringOption(option =>
- option.setName('reason')
- .setDescription('Reason Text')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
- const reason = exports[EasyAdmin].formatShortcuts(interaction.options.getString('reason'))
-
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
-
- DropPlayer(user.id, sprintf(exports[EasyAdmin].GetLocalisedText('kicked'), interaction.user.tag, reason ))
-
- var embed = await prepareGenericEmbed(`Successfully kicked **${user.name}** for **${reason}**`)
-
- await interaction.reply({ embeds: [embed]})
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/mute.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/mute.js
deleted file mode 100644
index c9d85d3e7..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/mute.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('mute')
- .setDescription('Mutes a User')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var ret = await exports[EasyAdmin].mutePlayer(user.id, true)
-
- if (ret) {
- let embed = await prepareGenericEmbed(`Successfully muted **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Could not mute **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/playerinfo.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/playerinfo.js
deleted file mode 100644
index 4a6c1a774..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/playerinfo.js
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('playerinfo')
- .setDescription('Gives Info about a Player')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided, if they have recently left, try using their ID instead of username', ephemeral: true})
- return
- }
-
- var displayedIdentifiers = []
-
- for (let identifier of user.identifiers) {
- if ((isNaN(identifier.charAt(0))) && !(GetConvar('ea_IpPrivacy', 'true') == 'true' && identifier.search('ip:') != -1)) {
- displayedIdentifiers.push(identifier)
- }
- }
-
- var table = AsciiTable.factory({
- heading: [ 'Identifiers'],
- rows: displayedIdentifiers
- })
-
- var discordAccount = await getDiscordAccountFromPlayer(user)
- var discordName = 'N/A'
- if (discordAccount) {
- discordName = discordAccount.tag
- }
-
-
- var embed = new EmbedBuilder()
- .setColor(16777214)
- .setTimestamp()
-
- embed.addFields([
- { name: 'Player Info', value: `Player infos for **${user.name}**`},
- { name: 'Discord Account', value: `\`\`\`${discordName}\`\`\``, inline: true}
- ])
-
- if (discordAccount) {
- embed.setThumbnail(discordAccount.avatarURL())
- }
-
- embed.addFields([
- { name: 'Admin', value: `\`\`\`${exports[EasyAdmin].IsPlayerAdmin(user.id)}\`\`\``, inline: true},
- { name: 'Warnings', value: `\`\`\`${exports[EasyAdmin].getPlayerWarnings(user.id)}\`\`\``, inline: true}
- ])
-
-
-
- if (!user.dropped) {
- var playerPed = GetPlayerPed(user.id)
- embed.addFields([
- { name: 'Health', value: `\`\`\`${GetEntityHealth(playerPed)}\`\`\``, inline: true},
- { name: 'Armour', value: `\`\`\`${GetPedArmour(playerPed)}\`\`\``, inline: true}
- ])
- if (GetPlayerInvincible(user.id)) {
- embed.addFields([{ name: 'Godmode', value: '```ON```', inline: true}])
- }
- } else {
- embed.addFields([{ name: 'Status', value: '```Player Disconnected```'}])
- }
-
-
- embed.addFields([{ name: 'Identifiers', value: `\`\`\`${table}\`\`\``}])
-
- await interaction.reply({ embeds: [embed]})
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/playerlist.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/playerlist.js
deleted file mode 100644
index a430c1b09..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/playerlist.js
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-function generatePaginatorRow(idFields, curPage, embedTimestamp) {
- const row = new ActionRowBuilder()
-
- var selector = new SelectMenuBuilder()
-
- var fieldLength = idFields.length
- if (fieldLength == 0) {fieldLength = 1}
- selector.setCustomId(`pageSelector${embedTimestamp}`)
- selector.setPlaceholder(`Page ${curPage+1}/${fieldLength}`)
-
- for (var i = 0; i < fieldLength; i++) {
- selector.addOptions([
- {
- label: `Page ${i+1}/${(fieldLength)}`,
- value: `${i}`,
- }])
- }
- if (!idFields[1]) {
- selector.setDisabled(true)
- }
- row.addComponents([selector])
- return row
-
-}
-
-
-function generateEmbedFields(embed, idFields,usernameFields,discordnamefields, curPage) {
- embed.addFields([{
- name: 'Id',
- value: idFields[curPage],
- inline: true
- }, {
- name: 'Name',
- value: usernameFields[curPage],
- inline: true
- }, {
- name: 'Discord',
- value: discordnamefields[curPage],
- inline: true
- }])
-}
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('playerlist')
- .setDescription('Shows a list of all Players'),
- async execute(interaction, exports) {
- var tempReply = await prepareGenericEmbed('```Processing Playerlist..```')
- await interaction.reply({
- embeds: [tempReply]
- })
-
- var players = await exports[EasyAdmin].getCachedPlayers()
- var embedTimestamp = Date.now()
-
- var embed = new EmbedBuilder()
- .setColor(65280)
- .setTimestamp()
-
- var idFields = []
- var usernameFields = []
- var discordnamefields = []
- var ids = ''
- var usernames = ''
- var discordnames = ''
- var curPage = 0
- var row
-
- if (getPlayers().length != 0) {
- for (let player of Object.values(players).entries()) {
- if (!player.dropped) {
-
- if (ids.length >= 500 || usernames.length >= 500 || discordnames.length >= 500) {
- idFields.push(ids)
- usernameFields.push(usernames)
- discordnamefields.push(discordnames)
- ids = ''
- usernames = ''
- discordnames = ''
- }
-
- var discordAccount = await getDiscordAccountFromPlayer(player)
- if (discordAccount) {
- discordAccount = discordAccount.tag
- } else {
- discordAccount = 'N/A'
- }
-
- ids += `\n${player.id}`
- usernames += `\n${player.name}`
- discordnames += `\n${discordAccount}`
- }
- }
- idFields.push(ids)
- usernameFields.push(usernames)
- discordnamefields.push(discordnames)
-
- generateEmbedFields(embed,idFields,usernameFields,discordnamefields,0)
-
- row = generatePaginatorRow(idFields, curPage, embedTimestamp)
- if (idFields.length > 1) {
- const filter = i => (i.customId === `pageSelector${embedTimestamp}`)
- const collector = interaction.channel.createMessageComponentCollector({
- filter,
- time: 120000
- })
-
- collector.on('collect', async i => {
- const embed = new EmbedBuilder()
- .setColor(65280)
- .setTimestamp()
- if (i.customId === `pageSelector${embedTimestamp}`) {
- curPage = parseInt(i.values[0])
- }
- generateEmbedFields(embed,idFields,usernameFields,discordnamefields,curPage)
-
- const row = generatePaginatorRow(idFields, curPage, embedTimestamp)
-
- await interaction.editReply({
- embeds: [embed],
- components: [row]
- })
- await i.deferUpdate()
- })
- }
- } else {
- embed = new EmbedBuilder()
- .setColor(16777214)
- .setTimestamp()
- .addFields([{name: 'Player List', value: 'There are no players on the server!'}])
- row = generatePaginatorRow(idFields, 0, 0)
- }
-
- await interaction.editReply({
- embeds: [embed],
- components: [row]
- })
- },
-}
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/refreshperms.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/refreshperms.js
deleted file mode 100644
index b30b95e9a..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/refreshperms.js
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('refreshperms')
- .setDescription('Refreshes your EasyAdmin permissions')
- .addUserOption(option =>
- option.setName('user')
- .setDescription('the user to refresh permissions for, optional.')
- .setRequired(false)),
-
- async execute(interaction) {
- var member = interaction.member
- let user = interaction.options.getUser('user')
- if (user && user.id == member.id) user = null
- if(user && !await DoesGuildMemberHavePermission(interaction.member, `bot.${interaction.commandName}`) == true) {
- await interaction.reply({ content: 'You don\'t have permission to refresh other users permissions!', ephemeral: true })
- return
- } else if (user) {
- member = await interaction.guild.members.fetch(user.id)
- }
-
- let username = (user && `${member.displayName}'s`) || 'your'
- await refreshRolesForMember(member)
-
- var embed = await prepareGenericEmbed(`Successfully refreshed ${username} permissions.`)
-
- await interaction.reply({ embeds: [embed]})
- },
-}
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/remove_ace.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/remove_ace.js
deleted file mode 100644
index 526aa7681..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/remove_ace.js
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('remove_ace')
- .setDescription('Removes a permission from a group, saves into easyadmin_permissions.cfg'),
- async execute(interaction, exports) {
- var timestamp = Date.now()
-
- const modal = new ModalBuilder()
- .setCustomId('removeaceModal'+timestamp)
- .setTitle('Remove ACE')
-
- const groupName = new TextInputBuilder()
- .setCustomId('groupName')
- .setLabel('Group Name')
- .setStyle(TextInputStyle.Short)
- .setRequired(true)
- .setMaxLength(120)
- .setPlaceholder('group.admin')
-
- const permission = new TextInputBuilder()
- .setCustomId('permission')
- // The label is the prompt the user sees for this input
- .setLabel('Permission')
- // Short means only a single line of text
- .setStyle(TextInputStyle.Short)
- .setRequired(true)
- .setMaxLength(120)
- .setPlaceholder('easyadmin.bot.playerlist')
-
- const firstActionRow = new ActionRowBuilder().addComponents(groupName)
- const secondActionRow = new ActionRowBuilder().addComponents(permission)
-
- modal.addComponents(firstActionRow, secondActionRow)
-
- interaction.showModal(modal)
-
- const filter = (interaction) => interaction.customId === 'removeaceModal'+timestamp
- interaction.awaitModalSubmit({ filter, time: 120000 })
- .then(async (interaction) => {
- var group = interaction.fields.getTextInputValue('groupName')
- var permission = interaction.fields.getTextInputValue('permission')
- var query = `remove_ace ${group} ${permission} allow`
- exports[EasyAdmin].RemoveFromFile('easyadmin_permissions.cfg', `add_ace ${group} ${permission} allow`)
-
- ExecuteCommand(query)
-
- interaction.reply(`\`${query}\` has been executed and saved.`)
- }).catch(async () => {}) // silently catch error, happens if the form times out
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/remove_group.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/remove_group.js
deleted file mode 100644
index 75fb43963..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/remove_group.js
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('remove_group')
- .setDescription('Removes a group from a User (ACE), saves into easyadmin_permissions.cfg')
- .addUserOption(option =>
- option.setName('user')
- .setDescription('The user')
- .setRequired(true))
- .addStringOption(option =>
- option.setName('group')
- .setDescription('the group, for example, group.admin')
- .setRequired(true)),
- async execute(interaction, exports) {
- const user = interaction.options.getUser('user').id
- const groupName = interaction.options.getString('group')
-
-
- var query = `remove_principal identifier.discord:${user} ${groupName}`
- exports[EasyAdmin].RemoveFromFile('easyadmin_permissions.cfg', `add_principal identifier.discord:${user} ${groupName}`)
-
- ExecuteCommand(query)
-
- interaction.reply(`\`${query}\` has been executed and saved.`)
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/screenshot.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/screenshot.js
deleted file mode 100644
index a95d7eff4..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/screenshot.js
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('screenshot')
- .setDescription('Takes a screenshot of the player\'s screen')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
- var embed = await prepareGenericEmbed('Taking Screenshot, please wait.')
- await interaction.reply({ embeds: [embed]})
-
-
- var inProgress = await exports[EasyAdmin].isScreenshotInProgress()
- if (inProgress) {
- let embed = await prepareGenericEmbed('A screenshot is already in progress! Please try again later.')
- interaction.editReply({ embeds: [embed]})
- return
- }
-
- const user = await findPlayerFromUserInput(userOrId)
- if (!user || user.dropped) {
- interaction.editReply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- emit('EasyAdmin:TakeScreenshot', user.id)
-
- const screenshotHandler = async function (result) {
- if (result == 'ERROR') { return }
-
- var screenshotUrl = await exports[EasyAdmin].matchURL(result.toString())
- RemoveEventHandler('EasyAdmin:TookScreenshot', screenshotHandler)
- clearTimeout(failedTimeout)
-
- let embed = await prepareGenericEmbed(`Screenshot of **${user.name}**'s game taken.`,undefined,undefined,undefined,screenshotUrl)
- await interaction.editReply({ embeds: [embed]})
- }
-
-
- onNet('EasyAdmin:TookScreenshot', screenshotHandler)
-
- var failedTimeout = setTimeout(async function () {
- RemoveEventHandler('EasyAdmin:TookScreenshot', screenshotHandler)
- let embed = await prepareGenericEmbed(`Screenshot of **${user.name}**'s game failed!`, undefined, 16711680)
- await interaction.editReply({ embeds: [embed]})
- }, 25000)
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/slap.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/slap.js
deleted file mode 100644
index 81c5dfbcf..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/slap.js
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('slap')
- .setDescription('Substracts amount of HP from player')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true))
- .addIntegerOption(option =>
- option.setName('amount')
- .setDescription('Amount of HP to slap the user for.')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
- const slapAmount = interaction.options.getInteger('amount')
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var ret = exports[EasyAdmin].slapPlayer(user.id, slapAmount)
-
- if (ret) {
- let embed = await prepareGenericEmbed(`Successfully slapped **${user.name}** for ${slapAmount} HP.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Could not slap **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unban.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unban.js
deleted file mode 100644
index 88c274b31..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unban.js
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('unban')
- .setDescription('unbans a User')
- .addIntegerOption(option =>
- option.setName('banid')
- .setDescription('Ban ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const banId = interaction.options.getInteger('banid')
-
-
- var ret = await exports[EasyAdmin].unbanPlayer(banId)
-
- if (ret == true) {
- let embed = await prepareGenericEmbed(`Successfully removed Ban **#${banId}**.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Failed to remove ban **#${banId}**, make sure the ID is valid.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unfreeze.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unfreeze.js
deleted file mode 100644
index 98542c92b..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unfreeze.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('unfreeze')
- .setDescription('Unfreezes player')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var ret = await exports[EasyAdmin].freezePlayer(user.id, false)
-
- if (ret) {
- let embed = await prepareGenericEmbed(`Successfully unfroze **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Could not unfreeze **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unmute.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unmute.js
deleted file mode 100644
index e023d5268..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/unmute.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('unmute')
- .setDescription('Unmutes a User')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var ret = await exports[EasyAdmin].mutePlayer(user.id, false)
-
- if (ret) {
- let embed = await prepareGenericEmbed(`Successfully unmuted **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- } else {
- let embed = await prepareGenericEmbed(`Could not unmute **${user.name}**.`)
-
- await interaction.reply({ embeds: [embed]})
- }
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/warn.js b/server-data/resources/[esx]/EasyAdmin/server/bot/commands/warn.js
deleted file mode 100644
index c3749851c..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/commands/warn.js
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-module.exports = {
- data: new SlashCommandBuilder()
- .setName('warn')
- .setDescription('Warn a User')
- .addStringOption(option =>
- option.setName('user')
- .setDescription('Username or ID')
- .setRequired(true))
- .addStringOption(option =>
- option.setName('reason')
- .setDescription('Reason Text')
- .setRequired(true)),
- async execute(interaction, exports) {
- const userOrId = interaction.options.getString('user')
- const reason = exports[EasyAdmin].formatShortcuts(interaction.options.getString('reason'))
-
-
- const user = await findPlayerFromUserInput(userOrId)
-
- if (!user || user.dropped) {
- interaction.reply({ content: 'Sorry, i couldn\'t find any user with the infos you provided.', ephemeral: true})
- return
- }
-
- var src = interaction.member.user.tag
- var ret = await exports[EasyAdmin].warnPlayer(src, user.id, reason)
- var embed
- if (ret) {
- embed = await prepareGenericEmbed(`Successfully warned **${user.name}** for **${reason}**`)
- } else {
- embed = await prepareGenericEmbed('Could not warn this user. (Maybe this user is immune)')
- }
- await interaction.reply({ embeds: [embed]})
- },
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/functions.js b/server-data/resources/[esx]/EasyAdmin/server/bot/functions.js
deleted file mode 100644
index 037c30594..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/functions.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/*eslint no-global-assign: "off", no-unused-vars: "off"*/
-// this file contains util functions the bot uses
-
-async function prepareGenericEmbed(message,feature,colour,title,image,customAuthor,description,timestamp) {
-
- if (feature && await exports[EasyAdmin].isWebhookFeatureExcluded(feature)) {
- return
- }
-
- const embed = new EmbedBuilder()
- .setColor(colour || 16777214)
- if (timestamp != false) {
- embed.setTimestamp()
- }
- if (message) {
- embed.addFields([{name: `**${(title || 'EasyAdmin')}**`, value: message}])
- }
- if (description) {
- embed.setDescription(description)
- }
-
- if (customAuthor) {
- embed.setAuthor(customAuthor)
- }
-
- if (image) {
- embed.setImage(image)
- }
-
- return embed
-}
-
-async function findPlayerFromUserInput(input) {
- var user
-
- var players = await exports[EasyAdmin].getCachedPlayers()
-
- Object.keys(players).forEach(function(key) {
- var player = players[key]
- var name = player.name
- if(!isNaN(input)) {
- if (player.id == input) {
- user = player
- }
- } else {
- if (name.search(input) != -1) {
- user = player
- }
- }
- })
-
- return user
-}
-
-
-async function DoesGuildMemberHavePermission(member, object) { // wrapper for Discord Permissions, use export for Player Permissions.
- if (!member || !object) { return false }
- var memberId = member.id
- if(!memberId) {
- return false
- }
- if (object.search('easyadmin.') == -1) {
- object = `easyadmin.${object}`
- }
-
- if (member.guild.ownerId === memberId) { // guild owner always has permissions, to everything.
- return true
- }
-
-
- var allowed=IsPrincipalAceAllowed(`identifier.discord:${memberId}`, object)
- return allowed
-}
-
-
-async function getDiscordAccountFromPlayer(user) {
- var discordAccount = false
- if (!isNaN(user)) {
- user = await exports[EasyAdmin].getCachedPlayer(user)
- }
-
- for (let identifier of user.identifiers) {
- if (identifier.search('discord:') != -1) {
- discordAccount = await client.users.fetch(identifier.substring(identifier.indexOf(':') + 1))
- }
- }
-
- return discordAccount
-}
-
-
-async function getPlayerFromDiscordAccount(user) {
- var id = user.id
-
- var players = await exports[EasyAdmin].getCachedPlayers()
-
- for (let [index, player] of Object.values(players).entries()) {
- for (let identifier of player.identifiers) {
- if (identifier == `discord:${id}`) {
- return player
- }
- }
- }
-
- return false
-}
-
-async function refreshRolesForMember(member) {
- var roles = await member.roles.cache.keys()
- for (var role of roles) {
- emit('debug', `role sync for ${member.user.tag} add_principal identifier.discord:${member.id} role:${role}`)
- ExecuteCommand(`add_principal identifier.discord:${member.id} role:${role}`)
- }
- emit('debug', `roles synced for ${member.user.tag}`)
-}
-
-async function refreshRolesForUser(user,roles) {
- for (var role of roles) {
- emit('debug', `role sync for ${user.tag} add_principal identifier.discord:${user.id} role:${role}`)
- ExecuteCommand(`add_principal identifier.discord:${user.id} role:${role}`)
- }
- emit('debug', `roles synced for ${user.tag}`)
-}
-
-// converts Lua format string to JS format string (e.g. %s -> %s) and replaces %s with arguments
-function format(str, ...args) {
- let formatted = str.replace(/%s/g, function() {
- return args.shift()
- })
- return formatted
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/logging.js b/server-data/resources/[esx]/EasyAdmin/server/bot/logging.js
deleted file mode 100644
index c7f76a382..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/logging.js
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-botLogForwards = []
-async function addBotLogForwarding(source,args) {
- var player=source
-
- if (await exports[GetCurrentResourceName()].DoesPlayerHavePermission(player, 'server')) {
- var feature = args[0]
- var channel = args[1]
-
- if (!feature || !parseInt(channel)) {
- console.error('Invalid Usage! ea_addBotLogForwarding feature channelId')
- return false
- }
-
- console.log(`Added log fwd ${feature} => ${channel}`)
- botLogForwards[feature] = channel
- return true
- }
-}
-
-
-RegisterCommand('ea_addBotLogForwarding', addBotLogForwarding)
-
-
-async function LogDiscordMessage(text, feature, colour) {
- if (!EasyAdmin) {return} // bot isnt running
- if (GetConvar('ea_botLogChannel', '') == '') {return}
- if (feature == 'report' || feature == 'calladmin') {return} // we dont care about reports, these get handled in reports.js
-
- const embed = await prepareGenericEmbed(text,undefined,colour)
-
-
- var channel = await client.channels.cache.get(botLogForwards[feature] || GetConvar('ea_botLogChannel', ''))
-
-
- if (channel) {
- channel.send({ embeds: [embed] }).catch((error) => {
- console.error('^7Failed to log message, please make sure you gave the bot permission to write in the log channel!\n\n')
- console.error(error)
-
- })
- } else {
- console.error('^7Failed to log message, please make sure you gave the bot permission to write in the log channel!\n\n')
- }
-}
-exports('LogDiscordMessage', LogDiscordMessage)
-
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/player_events.js b/server-data/resources/[esx]/EasyAdmin/server/bot/player_events.js
deleted file mode 100644
index 56756622c..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/player_events.js
+++ /dev/null
@@ -1,35 +0,0 @@
-if (GetConvar('ea_botToken', '') != '') {
-
- on('playerJoining', function () {
- const player = global.source
-
- if (GetConvar('ea_botToken', '') != '' && GetConvar('ea_botLogChannel', '') != '') {
- var msg = `Player **${exports[EasyAdmin].getName(player,true,true)}** with id **${player}** joined the Server!`
- LogDiscordMessage(msg, 'joinleave')
- }
- })
-
- on('playerConnecting', function () {
- if (GetConvar('ea_botToken', '') == '') return
- const player = global.source
-
- exports[EasyAdmin].syncDiscordRoles(player)
- })
-
-
- on('playerDropped', () => {
- if (GetConvar('ea_botToken', '') == '') return
- var player = global.source
-
- if (GetConvar('ea_botChatBridge', '') != '') {
- knownAvatars[player] = undefined
- }
-
- if (GetConvar('ea_botLogChannel', '') != '') {
- var msg = `Player **${exports[EasyAdmin].getName(player,true,true)}** left the server!`
- LogDiscordMessage(msg, 'joinleave')
- }
- })
-
-}
-
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/reports.js b/server-data/resources/[esx]/EasyAdmin/server/bot/reports.js
deleted file mode 100644
index ffe8d6716..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/reports.js
+++ /dev/null
@@ -1,69 +0,0 @@
-
-var reports = []
-
-function generateReportEmbed(report, disabled, closed) {
- var embed = new EmbedBuilder()
- .setTimestamp()
-
- if (closed) {
- embed.setColor(808080)
- } else {
- embed.setColor(65280)
- }
-
- if (report.type == 1) {
- embed.addFields([{name:'Player Report', value: `**${report.reporterName}** reported **${report.reportedName}**!`}])
- } else {
- embed.addFields([{name:'Admin Call', value: `**${report.reporterName}** called for an Admin!`}])
- }
-
- embed.addFields([
- {name:'Reason', value: `\`\`\`\n${report.reason}\`\`\``},
- {name:'Report ID', value: `#${report.id}`, inline: true},
- {name:'Claimed by', value:`${(report.claimedName || 'Noone')}`, inline: true}])
-
- return {embeds: [embed]}
-}
-
-async function logNewReport(report) {
- if (GetConvar('ea_botToken', '') != '') {
- var reportId = report.id
- reports[reportId] = report
- var reportMessage = generateReportEmbed(report)
- var channel = await client.channels.cache.get(GetConvar('ea_botLogChannel', ''))
- if (report.type == 1 && botLogForwards['report']) {
- channel = await client.channels.cache.get(botLogForwards['report'])
- } else if (report.type == 0 && botLogForwards['calladmin']) {
- channel = await client.channels.cache.get(botLogForwards['calladmin'])
- }
-
- var msg = await channel.send(reportMessage)
- reports[reportId].msg = msg
- } else {
- return false
- }
-}
-
-
-on('EasyAdmin:reportAdded', async function(reportdata) {
- logNewReport(reportdata)
-})
-
-on('EasyAdmin:reportClaimed', async function (reportdata) {
- var reportId = reportdata.id
- if(reports[reportId]) {
- reports[reportId].claimed = reportdata.claimed
- reports[reportId].claimedName = reportdata.claimedName
- let reportMessage = generateReportEmbed(reports[reportId], true)
- reports[reportId].msg.edit(reportMessage)
- }
-})
-
-on('EasyAdmin:reportRemoved', async function(reportdata) {
- var reportId = reportdata.id
- if(reports[reportId]) {
- var reportMessage = generateReportEmbed(reports[reportId], true, true)
- reports[reportId].msg.edit(reportMessage)
- reports[reportId] = undefined
- }
-})
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/roles.js b/server-data/resources/[esx]/EasyAdmin/server/bot/roles.js
deleted file mode 100644
index 66dd54200..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/roles.js
+++ /dev/null
@@ -1,48 +0,0 @@
-
-async function syncDiscordRoles(player) {
- if (!EasyAdmin) {return} // bot is down
- var user
-
-
- try {
- var identifiers = await exports[EasyAdmin].getAllPlayerIdentifiers(player)
- for (let identifier of identifiers) {
- if (identifier.search('discord:') != -1) {
- user = await client.users.fetch(identifier.substring(identifier.indexOf(':') + 1))
- }
- }
- if (!user) {
- return false
- }
- } catch (error) {
- return
- }
-
- var roles = []
- for (const id of client.guilds.cache.keys()) {
- const guild = client.guilds.cache.get(id)
- if (guild.members.cache.has(user.id)) {
- var guildMember = await guild.members.fetch(user.id)
- if (guildMember) {
- roles.push(...guildMember.roles.cache.keys())
- }
- }
- }
- refreshRolesForUser(user, roles)
-}
-exports('syncDiscordRoles', syncDiscordRoles)
-
-if (GetConvar('ea_botToken', '') != '') {
- client.on('guildMemberUpdate', async function(oldMember, newMember){
- oldRoles = await oldMember.roles.cache.keys()
- newRoles = await newMember.roles.cache.keys()
-
- for (let role of oldRoles) {
- ExecuteCommand(`remove_principal identifier.discord:${oldMember.id} role:${role}`)
- }
-
- for (let role of newRoles) {
- ExecuteCommand(`add_principal identifier.discord:${newMember.id} role:${role}`)
- }
- })
-}
diff --git a/server-data/resources/[esx]/EasyAdmin/server/bot/server_status.js b/server-data/resources/[esx]/EasyAdmin/server/bot/server_status.js
deleted file mode 100644
index 6bd1d4e4e..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/bot/server_status.js
+++ /dev/null
@@ -1,142 +0,0 @@
-
-var statusMessage
-var startTimestamp = new Date()
-
-
-async function getServerStatus(why) {
- var embed = new EmbedBuilder()
- .setColor(65280)
- .setTimestamp()
-
-
- var joinURL = GetConvar('web_baseUrl', '')
- var buttonRow = false
-
-
- if(joinURL != '' && joinURL.indexOf('cfx.re' != -1) && joinURL.match(/^[^A-z0-9]/)==null) {
- embed.setURL(`https://${joinURL}`)
- buttonRow = new ActionRowBuilder()
- var button = new ButtonBuilder()
- .setURL(`https://${joinURL}`)
- .setLabel('Join Server')
- .setStyle(ButtonStyle.Link)
- buttonRow.addComponents([button])
- } else {
- joinURL = ''
- }
- var serverName = GetConvar('sv_projectName', GetConvar('sv_hostname', 'default FXServer'))
- if (serverName.length > 255) {
- serverName = serverName.substring(0,255)
- }
- serverName = serverName.replace(/\^[0-9]/g, '')
-
- embed.addFields([{name: 'Server Name', value: `\`\`\`${serverName}\`\`\``}])
-
-
- var reports = await exports[EasyAdmin].getAllReports()
- var activeReports = 0
- var claimedReports = 0
- for (let report of Object.values(reports).entries()) {
- activeReports+=1
- if (report.claimed) {
- claimedReports+=1
- }
- }
-
- embed.addFields([
- { name: 'Players Online', value: `\`\`\`${getPlayers().length}/${GetConvar('sv_maxClients', '')}\`\`\``, inline: true},
- { name: 'Admins Online', value: `\`\`\`${Object.values(exports[EasyAdmin].GetOnlineAdmins()).length}\`\`\``, inline: true},
- { name: 'Reports', value: `\`\`\`${activeReports} (${claimedReports} claimed)\`\`\``, inline: true},
- { name: 'Active Vehicles', value: `\`\`\`${GetAllVehicles().length}\`\`\``, inline: true},
- { name: 'Active Peds', value: `\`\`\`${GetAllPeds().length}\`\`\``, inline: true},
- { name: 'Active Objects', value: `\`\`\`${GetAllObjects().length}\`\`\``, inline: true}
- ])
-
-
- if (joinURL != '') {
- try {
- let serverId = joinURL.substring(joinURL.lastIndexOf('-')+1,joinURL.indexOf('.users.cfx.re'))
- let response = await exports[EasyAdmin].HTTPRequest(`https://servers-frontend.fivem.net/api/servers/single/${serverId}`)
- response = JSON.parse(response).Data
- embed.addFields([{ name: 'Upvotes', value: `\`\`\`${response.upvotePower} Upvotes, ${response.burstPower} Bursts\`\`\``, inline: false}])
-
- embed.setAuthor({ name: `${serverName}`, iconURL: response.ownerAvatar, url: `https://${joinURL}`})
-
- } catch (error) {
- console.error(error)
- }
- }
- embed.addFields([{ name: 'Uptime', value: `\`\`\`${prettyMilliseconds(new Date()-startTimestamp, {verbose: true, secondsDecimalDigits: 0})}\`\`\``, inline: false}])
-
-
-
- if (why) {
- embed.addFields([{name: 'Last Update', value: why}])
- }
-
- if (buttonRow) {
- return {embeds: [embed], components: [buttonRow] }
- }
- return {embeds: [embed] }
-
-
-
-
-}
-
-async function updateServerStatus(why) {
- if (GetConvar('ea_botStatusChannel', '') == '') { return }
- var channel = await client.channels.fetch(GetConvar('ea_botStatusChannel', ''))
-
- if (channel == undefined) {
- console.error('Failed to configure bot status channel, please make sure the channel id is correct and the bot has read and write access.')
- return
- }
-
- if (!statusMessage) {
- var messagesToDelete = []
- var messages = await channel.messages.fetch({ limit: 10 }).catch((error) => {
- console.error('^7Failed to configure server status channel, please make sure you gave the bot permission to write in the channel!\n\n')
- console.error(error)
-
- })
- for (var message of messages.values()) {
- if (messages.size == 1 && message.author.id == client.user.id) {
- statusMessage = message
- break
- } else {
- messagesToDelete.push(message.id)
- }
- }
- try {
- if (statusMessage) {
- updateServerStatus()
- return
- }
- await channel.bulkDelete(messagesToDelete)
- } catch (error) {
- console.log('Could not bulk-delete messages in botStatusChannel.')
- console.error(error)
- }
- let embed = await prepareGenericEmbed('Fetching Server Infos..')
- statusMessage = await channel.send({ embeds: [embed] })
- }
- const embed = await getServerStatus(why)
- statusMessage.edit(embed)
-
-}
-
-client.on('messageCreate', async msg => {
- if (!msg.member || msg.author.bot) { return } // message-sender is a webhook
- if(msg.author.id == userID) {
- return
- }
- if(!msg.channel) { return }
- if (msg.channel.id == GetConvar('ea_botStatusChannel', '')) {
- msg.delete()
- updateServerStatus('manual')
- }
-
-})
-setTimeout(updateServerStatus, 10000)
-setInterval(updateServerStatus, 180000)
diff --git a/server-data/resources/[esx]/EasyAdmin/server/commands.lua b/server-data/resources/[esx]/EasyAdmin/server/commands.lua
deleted file mode 100644
index ad6147693..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/commands.lua
+++ /dev/null
@@ -1,91 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-RegisterCommand("ea_addShortcut", function(source, args, rawCommand)
- if args[2] and DoesPlayerHavePermission(source, "server.shortcut.add") then
- local shortcut = args[1]
- local text = table.concat(args, " ", 2)
-
- PrintDebugMessage("added '"..shortcut.." -> "..text.."' as a shortcut", 3)
- MessageShortcuts[shortcut] = text
-
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:fillShortcuts", i, 10000, MessageShortcuts)
- end
- end
-end)
-
-RegisterCommand("ea_addReminder", function(source, args, rawCommand)
- if args[1] and DoesPlayerHavePermission(source, "server.reminder.add") then
- local text = string.gsub(rawCommand, "ea_addReminder ", "")
- local text = string.gsub(text, '"', '')
-
- PrintDebugMessage("added '"..text.."' as a Chat Reminder", 3)
- table.insert(ChatReminders, text)
- end
-end, false)
-
-RegisterCommand("ea_printIdentifiers", function(source,args,rawCommand)
- if source == 0 and args[1] then -- only let Console run this command
- local id = tonumber(args[1])
- print(json.encode(CachedPlayers[id].identifiers)) -- puke all identifiers into console
- end
-end,false)
-
-Citizen.CreateThread(function()
- RegisterCommand("ea_generateSupportFile", function(source, args, rawCommand)
- if DoesPlayerHavePermission(source, "server") then
- print("SupportFile is no longer supported, please use eaDiag instead.")
- end
- end, false)
-
-end)
-
-RegisterCommand("spectate", function(source, args, rawCommand)
- if(source == 0) then
- Citizen.Trace(GetLocalisedText("badidea")) -- Maybe should be it's own string saying something like "only players can do this" or something
- end
-
- PrintDebugMessage("Player "..getName(source,true).." Requested Spectate on "..getName(args[1],true), 3)
-
- if args[1] and tonumber(args[1]) and DoesPlayerHavePermission(source, "player.spectate") then
- if getName(args[1]) then
- TriggerClientEvent("EasyAdmin:requestSpectate", source, args[1])
- else
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("playernotfound"))
- end
- end
-end, false)
-
-
-RegisterCommand("setgametype", function(source, args, rawCommand)
- if args[1] and DoesPlayerHavePermission(source, "server.convars") then
- PrintDebugMessage("Player "..getName(source,true).." set Gametype to "..args[1], 3)
- SetGameType(args[1])
- end
-end, false)
-
-RegisterCommand("setmapname", function(source, args, rawCommand)
- if args[1] and DoesPlayerHavePermission(source, "server.convars") then
- PrintDebugMessage("Player "..getName(source,true).." set Map Name to "..args[1], 3)
- SetMapName(args[1])
- end
-end, false)
-
-RegisterCommand("slap", function(source, args, rawCommand)
- if args[1] and args[2] and DoesPlayerHavePermission(source, "player.slap") then
- local preferredWebhook = detailNotification ~= "false" and detailNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("adminslappedplayer"), getName(source, false, true), getName(args[1], true, true), args[2]), "slap", 16711680)
- PrintDebugMessage("Player "..getName(source,true).." slapped "..getName(args[1],true).." for "..args[2].." HP", 3)
- TriggerClientEvent("EasyAdmin:SlapPlayer", args[1], args[2])
- end
-end, false)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/permission_editor.lua b/server-data/resources/[esx]/EasyAdmin/server/permission_editor.lua
deleted file mode 100644
index c7576b364..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/permission_editor.lua
+++ /dev/null
@@ -1,342 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-Citizen.CreateThread(function()
- local add_aces = {}
- local add_principals = {}
- function readAcePermissions()
- Citizen.CreateThread(function()
- add_aces, add_principals, execs = FindInfosinFile("server.cfg")
- for i, config in pairs(execs) do
- local tempaces, tempprincipals, _ = FindInfosinFile(config)
- add_aces = mergeTables(add_aces, tempaces)
- add_principals = mergeTables(add_principals, tempprincipals)
- end
- end)
- end
-
- function FindInfosinFile(filename)
- local path = GetResourcePath(GetCurrentResourceName())
- local occurance = string.find(path, "/resources", 1, true)
- local path = string.reverse(string.sub(string.reverse(path), -occurance))
-
- local filename = filename
-
- local lines = {}
- local needsExec = true
- local needsResourcePerms = true
-
- if filename == "server.cfg" then
- needsResourcePerms = false
- elseif filename == "easyadmin_permissions.cfg" then
- needsExec = false
- else
- needsResourcePerms, needsExec = false, false
- end
- local changes = false
- local aces, principals, execs = {}, {}, {}
-
- PrintDebugMessage("reading "..filename, 4)
-
- local file = io.open(filename, "r")
- if file then
- line = file:read("*line")
- while line do
- table.insert(lines,line)
- line = file:read("*line")
- end
- file:close()
-
- for i, line in pairs(lines) do
- if filename == "server.cfg" then
- needsResourcePerms = false
- if string.find(line, "exec easyadmin_permissions.cfg", 1, true) then
- needsExec = false
- end
- elseif filename == "easyadmin_permissions.cfg" then
- needsExec = false
- if string.find(line, "add_ace resource."..GetCurrentResourceName().." command.add_ace allow", 1, true) then
- needsResourcePerms = false
- end
- else
- local broken = false
- -- remove broken lines
- if string.find(line, "exec easyadmin_permissions.cfg", 1, true) then
- RemoveFromFile(filename, "exec easyadmin_permissions.cfg")
- elseif string.find(line, "add_ace resource."..GetCurrentResourceName().." command.", 1, true) then
- RemoveFromFile(filename, line)
- end
- end
-
- -- filteredLine variable converts tabs to spaces, and multiple spaces to single space
- local filteredLine = string.gsub(line, "%s+", " ")
- -- remove comments
- filteredLine = string.gsub(filteredLine, "%s*#.*$", "")
-
-
-
- -- strip the arguments from the "add_ace", "add_principal" and "exec" commands and insert them into their respective tables
- if string.find(filteredLine, "add_ace", 1, true) then
- local args = string.split(filteredLine, " ")
- if args[2] and args[3] and args[4] then
- table.insert(aces, {file = filename, oldline = line, args[2], args[3], args[4]})
- end
- elseif string.find(filteredLine, "add_principal", 1, true) then
- local args = string.split(filteredLine, " ")
- if args[2] and args[3] then
- table.insert(principals, {file = filename, oldline = line, args[2], args[3]})
- end
- elseif string.find(filteredLine, "exec", 1, true) then
- local args = string.split(filteredLine, " ")
- if args[2] then
- table.insert(execs, args[2])
- end
- end
- end
-
- if needsExec or needsResourcePerms or changes then
- local newLines = {}
- if needsExec then
- table.insert(newLines, "exec easyadmin_permissions.cfg")
- table.insert(execs, "easyadmin_permissions.cfg")
- PrintDebugMessage("Did not find `exec easyadmin_permissions.cfg`, added it automatically", 4)
- changes=true
- end
- if needsResourcePerms then
- table.insert(newLines, "# This file was generated automatically by EasyAdmin #")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.add_ace allow")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.remove_ace allow")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.add_principal allow")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.remove_principal allow")
- PrintDebugMessage("Did not find `add_ace resource."..GetCurrentResourceName().."` lines, added them automatically", 4)
- changes=true
- end
- local output = "\n"
- if changes then
- local file = io.open(filename, "a+") -- reopen in write mode
- for i, line in pairs(newLines) do
- output=output..line.."\n"
- end
- file:write(output) -- write our lines
- file:close()
- end
- end
-
- for i,ace in pairs(aces) do
- PrintDebugMessage("parsed ace ^1"
- ..tostring(ace[1]).." "
- ..tostring(ace[2]).." "
- ..tostring(ace[3]).."^7 in "
- ..filename.."\n", 4)
- end
-
- for i,ace in pairs(principals) do
- PrintDebugMessage("parsed principal ^1"
- ..tostring(ace[1]).." "
- ..tostring(ace[2]).."^7 in "
- ..filename.."\n", 4)
- end
-
- for i,ace in pairs(execs) do
- PrintDebugMessage("parsed exec ^1"
- ..tostring(ace).."^7 in "
- ..filename.."\n", 4)
- end
-
- return aces, principals, execs
- else
- if filename == "easyadmin_permissions.cfg" then
- local file = io.open(filename, "w")
- local newLines = {}
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.add_ace allow")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.remove_ace allow")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.add_principal allow")
- table.insert(newLines, "add_ace resource."..GetCurrentResourceName().." command.remove_principal allow")
- local output = ""
- for i, line in pairs(newLines) do
- output=output..line.."\n"
- end
- file:write(output) -- write our lines
- file:close()
- end
- PrintDebugMessage(filename.." cannot be read, bailing.", 4)
- return {}, {}, {}
- end
- end
-
- Citizen.CreateThread(function()
- lockedFiles = {}
- function AddToFile(filename, args)
- if not GetInvokingResource() or GetInvokingResource() == GetCurrentResourceName() then -- sorry, but i _really_ dont want other resources hooking into easyadmins file edit functions.
-
- local path = GetResourcePath(GetCurrentResourceName())
- local occurance = string.find(path, "/resources", 1, true)
- local path = string.reverse(string.sub(string.reverse(path), -occurance))
-
-
- local args = args
- local filename = filename
- while lockedFiles[filename] do
- Wait(100)
- end
- lockedFiles[filename] = true
-
-
- local file = io.open(filename, "a")
- if file then
- file:write("\n"..args) -- write our lines
- file:close()
- else
- PrintDebugMessage(filename.." cannot be read, bailing.", 4)
- return {}, {}, {}
- end
- Wait(500) -- without waiting after saving a file it sometimes does not properly save, some OS limitation maybe?
- lockedFiles[filename] = false
- end
- end
- exports('AddToFile', AddToFile)
-
- function RemoveFromFile(filename, args, partial)
- if not GetInvokingResource() or GetInvokingResource() == GetCurrentResourceName() then -- sorry, but i _really_ dont want other resources hooking into easyadmins file edit functions.
-
- local path = GetResourcePath(GetCurrentResourceName())
- local occurance = string.find(path, "/resources", 1, true)
- local path = string.reverse(string.sub(string.reverse(path), -occurance))
-
- local args = args
- local filename = filename
- while lockedFiles[filename] do
- Wait(100)
- end
- lockedFiles[filename] = true
-
- local file = io.open(filename, "r")
- local lines = {}
- if file then
- local line = file:read("*line")
- while line do
- if (partial and string.find(line, args) or (not partial and line == args)) or (filename == "easyadmin_permissions.cfg" and line == "") then -- skip lines we dont want, incl. empty lines
- else
- table.insert(lines, line)
- end
- line = file:read("*line")
- end
- file:close()
- local output = ""
- for i, line in pairs(lines) do
- output=output..line.."\n"
- end
- local file = io.open(filename, "w")
- file:write(output) -- write our lines
- file:close()
- else
- PrintDebugMessage(filename.." cannot be read, bailing.", 4)
- return {}, {}, {}
- end
- Wait(500) -- without waiting after saving a file it sometimes does not properly save, some OS limitation maybe?
- lockedFiles[filename] = false
- end
- end
- exports('RemoveFromFile', RemoveFromFile)
- end)
-
- RegisterServerEvent("EasyAdmin:getServerAces", function()
- if DoesPlayerHavePermission(source, "server.permissions.read") then
- TriggerLatentClientEvent("EasyAdmin:getServerAces", source, 100000, add_aces, add_principals)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:setServerAces", function(aces,principals)
- if DoesPlayerHavePermission(source, "server.permissions.write") then
- local source=source
- local aces=aces
- local principals=principals
- -- reconfigure aces
- for i, ace in pairs(add_aces) do
-
- if not aces[i] then
- if not ace.file then ace.file = "easyadmin_permissions.cfg" end
-
- ExecuteCommand("remove_ace "..ace[1].." "..ace[2].." "..ace[3])
- RemoveFromFile(ace.file, ace.oldline or "add_ace "..ace[1].." "..ace[2].." "..ace[3])
-
-
- PrintDebugMessage("Executed remove_ace "..ace[1].." "..ace[2].." "..ace[3], 4)
- elseif aces[i][1] ~= ace[1] or aces[i][2] ~= ace[2] or aces[i][3] ~= ace[3] then
- if not ace.file then ace.file = "easyadmin_permissions.cfg" end
- if not aces[i].file then aces[i].file = "easyadmin_permissions.cfg" end
- ExecuteCommand("remove_ace "..ace[1].." "..ace[2].." "..ace[3])
- RemoveFromFile(ace.file, ace.oldline or "add_ace "..ace[1].." "..ace[2].." "..ace[3])
-
- ExecuteCommand("add_ace "..aces[i][1].." "..aces[i][2].." "..aces[i][3])
- AddToFile(aces[i].file, "add_ace "..aces[i][1].." "..aces[i][2].." "..aces[i][3])
-
-
- PrintDebugMessage("Executed remove_ace "..ace[1].." "..ace[2].." "..ace[3], 4)
- PrintDebugMessage("Executed add_ace "..aces[i][1].." "..aces[i][2].." "..aces[i][3], 4)
- end
- end
- for i, ace in pairs(aces) do
- if not add_aces[i] then
- if not ace.file then ace.file = "easyadmin_permissions.cfg" end
-
- ExecuteCommand("add_ace "..ace[1].." "..ace[2].." "..ace[3])
- AddToFile(ace.file, "add_ace "..ace[1].." "..ace[2].." "..ace[3])
-
- PrintDebugMessage("Executed add_ace "..ace[1].." "..ace[2].." "..ace[3], 4)
- end
- end
- -- reconfigure principals
- for i, principal in pairs(add_principals) do
-
- -- set file as our permissions file in case its unset
-
- if not principals[i] then
- if not principal.file then principal.file = "easyadmin_permissions.cfg" end
-
- ExecuteCommand("remove_principal "..principal[1].." "..principal[2])
- RemoveFromFile(principal.file, principal.oldline or "add_principal "..principal[1].." "..principal[2])
-
- PrintDebugMessage("Executed remove_principal "..principal[1].." "..principal[2], 4)
- elseif principals[i][1] ~= principal[1] or principals[i][2] ~= principal[2] then
- if not principal.file then principal.file = "easyadmin_permissions.cfg" end
- if not principals[i].file then principals[i].file = "easyadmin_permissions.cfg" end
-
- ExecuteCommand("remove_principal "..principal[1].." "..principal[2])
- RemoveFromFile(principal.file, principal.oldline or "add_principal "..principal[1].." "..principal[2])
-
-
- ExecuteCommand("add_principal "..principals[i][1].." "..principals[i][2])
- AddToFile(principals[i].file, "add_principal "..principals[i][1].." "..principals[i][2])
-
- PrintDebugMessage("Executed remove_principal "..principal[1].." "..principal[2], 4)
- PrintDebugMessage("Executed add_principal "..principals[i][1].." "..principals[i][2], 4)
- end
- end
- for i, principal in pairs(principals) do
- if not add_principals[i] then
- if not principal.file then principal.file = "easyadmin_permissions.cfg" end
- ExecuteCommand("add_principal "..principal[1].." "..principal[2])
- AddToFile(principal.file, "add_principal "..principal[1].." "..principal[2])
-
- PrintDebugMessage("Executed add_principal "..principal[1].." "..principal[2], 4)
- end
- end
-
-
- add_aces = aces
- add_principals = principals
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("admineditedpermissions"), getName(source, false, true)), "permissions", 16777214)
- TriggerLatentClientEvent("EasyAdmin:getServerAces", source, 100000, add_aces, add_principals)
- end
- end)
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/playercache.lua b/server-data/resources/[esx]/EasyAdmin/server/playercache.lua
deleted file mode 100644
index fd83500f4..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/playercache.lua
+++ /dev/null
@@ -1,67 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-CachedPlayers = {} -- DO NOT TOUCH THIS
-
-Citizen.CreateThread(function()
- while true do
- Wait(20000)
- local osTime = os.time()
- local playerCacheExpiry = GetConvarInt("ea_playerCacheExpiryTime", 1800)
- for i, player in pairs(CachedPlayers) do
- if player.droppedTime and (osTime > player.droppedTime+playerCacheExpiry) then
- PrintDebugMessage("Cache for "..player.id.." expired, removing from cache.", 3)
- for i, report in pairs(reports) do
- if report.reported == player.id then
- reports[i] = nil
- end
- end
- CachedPlayers[i]=nil
- end
- end
- end
-end)
-
-function cachePlayer(playerId)
- if not CachedPlayers[playerId] then
- CachedPlayers[playerId] = {id = playerId, name = getName(playerId, true), identifiers = getAllPlayerIdentifiers(playerId), immune = DoesPlayerHavePermission(playerId, "immune")}
- PrintDebugMessage(getName(playerId).." has been added to cache.", 4)
- return true
- end
- return false
-end
-
-RegisterServerEvent("EasyAdmin:requestCachedPlayers", function()
- PrintDebugMessage(getName(source, true).." requested Cache.", 4)
- local src = source
- if (DoesPlayerHavePermission(source, "player.ban.temporary") or DoesPlayerHavePermission(source, "player.ban.permanent")) then
- TriggerLatentClientEvent("EasyAdmin:fillCachedPlayers", src, 200000, CachedPlayers)
- end
-end)
-
-function getCachedPlayers() -- this is server-only for security reasons.
- return CachedPlayers
-end
-exports('getCachedPlayers', getCachedPlayers)
-
-function getCachedPlayer(id)
- cachePlayer(tonumber(id))
- return CachedPlayers[tonumber(id)]
-end
-exports('getCachedPlayer', getCachedPlayer)
-
-AddEventHandler('playerDropped', function (reason)
- if CachedPlayers[source] then
- CachedPlayers[source].droppedTime = os.time()
- CachedPlayers[source].dropped = true
- end
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/reports.lua b/server-data/resources/[esx]/EasyAdmin/server/reports.lua
deleted file mode 100644
index 787c0a18f..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/reports.lua
+++ /dev/null
@@ -1,248 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-AddEventHandler('playerDropped', function (reason)
- for i, report in pairs(reports) do
- if report.reporter == source or (report.reported and report.reported == source) then
- removeReport(report.id)
- end
- end
- if cooldowns[source] then
- cooldowns[source] = nil
- end
-end)
-
-cooldowns = {} -- DO NOT TOUCH THIS
-
-Citizen.CreateThread(function()
-
- PlayerReports = {}
-
- if GetConvar("ea_enableCallAdminCommand", "true") == "true" then
- RegisterCommand(GetConvar("ea_callAdminCommandName", "calladmin"), function(source, args, rawCommand)
- if args[1] then
- local time = os.time()
- local cooldowntime = GetConvarInt("ea_callAdminCooldown", 60)
- local source=source
- if cooldowns[source] and cooldowns[source] > (time - cooldowntime) then
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("waitbeforeusingagain"))
- return
- end
-
- local reason = string.gsub(rawCommand, GetConvar("ea_callAdminCommandName", "calladmin").." ", "")
- local reportid = addNewReport(0, source, _,reason)
- for i,_ in pairs(OnlineAdmins) do
- local notificationText = string.format(string.gsub(GetLocalisedText("playercalledforadmin"), "```", ""), getName(source,true,false), reason, reportid)
- TriggerClientEvent("EasyAdmin:showNotification", i, notificationText)
- end
-
-
- local preferredWebhook = (reportNotification ~= "false") and reportNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("playercalledforadmin"), getName(source, true, true), reason, reportid), "calladmin", 16776960)
- --TriggerClientEvent('chatMessage', source, "^3EasyAdmin^7", {255,255,255}, GetLocalisedText("admincalled"))
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("admincalled"))
-
- time = os.time()
- cooldowns[source] = time
- else
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("invalidreport"))
- end
- end, false)
- end
- if GetConvar("ea_enableReportCommand", "true") == "true" then
- RegisterCommand(GetConvar("ea_reportCommandName", "report"), function(source, args, rawCommand)
- if args[2] then
- local source = source
- local id = args[1]
- local valid = false
- local minimumreports = GetConvarInt("ea_defaultMinReports", 3)
- if GetConvar("ea_MinReportModifierEnabled", "true") == "true" then
- if #GetPlayers() > GetConvarInt("ea_MinReportPlayers", 12) then
- minimumreports = math.round(#GetPlayers()/GetConvarInt("ea_MinReportModifier", 4),0)
- end
- end
- if id and not GetPlayerIdentifier(id, 1) then
- for i, player in pairs(GetPlayers()) do
- if string.find(string.lower(getName(player, true)), string.lower(id)) then
- id = player
- valid = true
- break
- end
- end
- else
- valid = true
- end
-
-
- if id and valid then
- local reason = string.gsub(rawCommand, GetConvar("ea_reportCommandName", "report").." " ..args[1].." ", "")
- if not PlayerReports[id] then
- PlayerReports[id] = { }
- end
- local addReport = true
- for i, report in pairs(PlayerReports[id]) do
- if report.source == source or report.sourceName == getName(source, true) then
- addReport = false
- end
- end
- if addReport then
- table.insert(PlayerReports[id], {source = source, sourceName = getName(source, true), reason = reason, time = os.time()})
- local reportid = addNewReport(1, source, id, reason)
- local preferredWebhook = (reportNotification ~= "false") and reportNotification or moderationNotification
- SendWebhookMessage(preferredWebhook,string.format(GetLocalisedText("playerreportedplayer"), getName(source, false, true), getName(id, true, true), reason, #PlayerReports[id], minimumreports, reportid), "report", 16776960)
- if GetConvar("ea_enableReportScreenshots", "true") == "true" then
- TriggerEvent("EasyAdmin:TakeScreenshot", id)
- end
-
-
- for i,_ in pairs(OnlineAdmins) do
- local notificationText = string.format(string.gsub(GetLocalisedText("playerreportedplayer"), "```", ""), getName(source, false, false), getName(id, true, false), reason, #PlayerReports[id], minimumreports, reportid)
- TriggerClientEvent('chat:addMessage', i, {
- template = '
{0}
',
- args = { "^3EasyAdmin Report^7\n"..notificationText }, color = { 255, 255, 255 }
- })
- TriggerClientEvent("EasyAdmin:showNotification", i, notificationText)
- end
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("successfullyreported"))
-
- if #PlayerReports[id] >= minimumreports then
- TriggerEvent("EasyAdmin:addBan", id, string.format(GetLocalisedText("reportbantext"), minimumreports), os.time()+GetConvarInt("ea_ReportBanTime", 86400))
- end
- else
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("alreadyreported"))
- end
- else
- TriggerClientEvent('chat:addMessage', source, {
- template = '
{0}: {1}
',
- args = { "^3EasyAdmin^7", GetLocalisedText("reportedusageerror") }, color = { 255, 255, 255 }
- })
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("reportedusageerror"))
- end
- else
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("invalidreport"))
- end
- end, false)
- end
-
-
- function addNewReport(type, reporter, reported, reason)
- local t = nil
- if type == 1 then
- t = {type=type, reporter=reporter, reporterName=getName(reporter, true), reported=reported, reportedName=getName(reported, true),reason=reason}
- else
- t = {type=type, reporter=reporter, reporterName=getName(reporter, true), reason=reason}
- end
- t.id = #reports+1
- reports[t.id] = t
- for i,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:NewReport", i, 10000, t)
- end
- TriggerEvent("EasyAdmin:reportAdded", t)
- return t.id
- end
-
- RegisterServerEvent("EasyAdmin:ClaimReport", function(reportId)
- if DoesPlayerHavePermission(source, "player.reports.claim") then
- if not reports[reportId].claimed then
- reports[reportId].claimed = source
- reports[reportId].claimedName = getName(source,true)
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:ClaimedReport", admin, 10000, reports[reportId])
- end
- TriggerEvent("EasyAdmin:reportClaimed", reports[reportId])
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminclaimedreport"), getName(source, false, true), reportId), "reports", 16777214)
- else
- TriggerClientEvent("EasyAdmin:showNotification", source, GetLocalisedText("reportalreadyclaimed"))
- end
- end
- end)
-
- function removeReport(index,reporter,reported,reason)
- for i, report in pairs(reports) do
- if (index and i == index) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, report)
- end
- TriggerEvent("EasyAdmin:reportRemoved", report)
- reports[i] = nil
- elseif (reporter and reporter == report.reporter) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, report)
- end
- TriggerEvent("EasyAdmin:reportRemoved", report)
- reports[i] = nil
- elseif (reported and reported == report.reported) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, report)
- end
- TriggerEvent("EasyAdmin:reportRemoved", report)
- reports[i] = nil
- end
- end
- end
-
- function removeSimilarReports(report)
- for i, r in pairs(reports) do
- if (report.reporter and report.reported) and (report.reporter == r.reporter and report.reported == r.reported) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, r)
- end
- TriggerEvent("EasyAdmin:reportRemoved", r)
- reports[i] = nil
- end
- if (report.reason and report.reporter) and (report.reason == r.reason and report.reporter == r.reporter) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, r)
- end
- TriggerEvent("EasyAdmin:reportRemoved", r)
- reports[i] = nil
- end
- if (report.reported) and (report.reported == r.reported) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, r)
- end
- TriggerEvent("EasyAdmin:reportRemoved", r)
- reports[i] = nil
- end
- if (report.reporter) and (report.reporter == r.reporter) then
- for admin,_ in pairs(OnlineAdmins) do
- TriggerLatentClientEvent("EasyAdmin:RemoveReport", admin, 10000, r)
- end
- TriggerEvent("EasyAdmin:reportRemoved", r)
- reports[i] = nil
- end
- end
- end
-
-
- function getAllReports()
- return reports
- end
- exports('getAllReports', getAllReports)
-
-
-
- RegisterServerEvent("EasyAdmin:RemoveReport", function(report)
- if DoesPlayerHavePermission(source, "player.reports.process") then
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminclosedreport"), getName(source, false, true), report.id), "reports", 16777214)
- removeReport(report.id)
- end
- end)
-
- RegisterServerEvent("EasyAdmin:RemoveSimilarReports", function(report)
- if DoesPlayerHavePermission(source, "player.reports.process") then
- SendWebhookMessage(moderationNotification,string.format(GetLocalisedText("adminclosedreport"), getName(source, false, true), report.id), "reports", 16777214)
- removeSimilarReports(report)
- end
- end)
-
-end)
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/server/webhook.lua b/server-data/resources/[esx]/EasyAdmin/server/webhook.lua
deleted file mode 100644
index c8f3714a2..000000000
--- a/server-data/resources/[esx]/EasyAdmin/server/webhook.lua
+++ /dev/null
@@ -1,63 +0,0 @@
-------------------------------------
-------------------------------------
----- DONT TOUCH ANY OF THIS IF YOU DON'T KNOW WHAT YOU ARE DOING
----- THESE ARE **NOT** CONFIG VALUES, USE THE CONVARS IF YOU WANT TO CHANGE SOMETHING
-----
-----
----- If you are a developer and want to change something, consider writing a plugin instead:
----- https://easyadmin.readthedocs.io/en/latest/plugins/
-----
-------------------------------------
-------------------------------------
-
-ExcludedWebhookFeatures = {}
-RegisterCommand("ea_testWebhook", function(source, args, rawCommand)
- if DoesPlayerHavePermission(source, "server") then
- SendWebhookMessage(moderationNotification, "**Testing Webhook for moderationNotification**", false, 65280)
- SendWebhookMessage(detailNotification, "**Testing Webhook for detailNotification**", false, 65280)
- SendWebhookMessage(reportNotification, "**Testing Webhook for reportNotification**", false, 65280)
- PrintDebugMessage("Webhook Message Sent")
- end
-end, false)
-
-RegisterCommand("ea_excludeWebhookFeature", function(source, args, rawCommand)
- if DoesPlayerHavePermission(source, "server") then
- ExcludedWebhookFeatures = Set(args)
- PrintDebugMessage("Webhook excludes set", 3)
- end
-end, false)
-
-
-function isWebhookFeatureExcluded(feature)
- return ExcludedWebhookFeatures[feature]
-end
-exports('isWebhookFeatureExcluded', isWebhookFeatureExcluded)
-
-function SendWebhookMessage(webhook,message,feature,colour,title,image)
- moderationNotification = GetConvar("ea_moderationNotification", "false")
- reportNotification = GetConvar("ea_reportNotification", "false")
- detailNotification = GetConvar("ea_detailNotification", "false")
-
- local embed = {
- {
- ["color"] = (colour or 16777214),
- ["title"] = "**"..(title or "EasyAdmin").."**",
- ["description"] = message,
- ["footer"] = {
- ["text"] = "EasyAdmin on "..formatDateString(os.time()),
- },
- }
- }
- if image then
- embed[1]["image"] = { ["url"] = image }
- end
-
- if GetConvar("ea_botLogChannel", "") ~= "" then
- exports[GetCurrentResourceName()]:LogDiscordMessage(message, feature, colour)
- return
- end
-
- if webhook ~= "false" and ExcludedWebhookFeatures[feature] ~= true then
- PerformHttpRequest(webhook, function(err, text, headers) end, 'POST', json.encode({embeds = embed}), { ['Content-Type'] = 'application/json' })
- end
-end
\ No newline at end of file
diff --git a/server-data/resources/[esx]/EasyAdmin/shared/util_shared.lua b/server-data/resources/[esx]/EasyAdmin/shared/util_shared.lua
deleted file mode 100644
index 5948bb4cf..000000000
--- a/server-data/resources/[esx]/EasyAdmin/shared/util_shared.lua
+++ /dev/null
@@ -1,352 +0,0 @@
-permissions = {
- ["player.ban.temporary"] = false,
- ["player.ban.permanent"] = false,
- ["player.ban.view"] = false,
- ["player.ban.edit"] = false,
- ["player.ban.remove"] = false,
- ["player.kick"] = false,
- ["player.spectate"] = false,
- ["player.teleport.single"] = false,
- ["player.slap"] = false,
- ["player.freeze"] = false,
- ["player.screenshot"] = false,
- ["player.mute"] = false,
- ["player.warn"] = false,
- ["player.teleport.everyone"] = false,
- ["player.reports.view"] = false,
- ["player.reports.claim"] = false,
- ["player.reports.process"] = false,
- ["server.cleanup.cars"] = false,
- ["server.cleanup.props"] = false,
- ["server.cleanup.peds"] = false,
- ["server.permissions.read"] = false,
- ["server.permissions.write"] = false,
- ["server.shortcut.add"] = false,
- ["server.reminder.add"] = false,
- ["server.announce"] = false,
- ["server.convars"] = false,
- ["server.resources.start"] = false,
- ["server.resources.stop"] = false,
- ["server.chat"] = false,
- ["immune"] = false,
- ["anon"] = false,
-}
-
-
-function PrintDebugMessage(msg,level)
- loglevel = (GetConvarInt("ea_logLevel", 1))
- if not level or not tonumber(level) then level = 3 end
-
- if level == 1 and loglevel >= level then -- ERROR Loglevel
- Citizen.Trace("^1"..GetCurrentResourceName().."^7: "..msg.."^7\n")
-
- if IsDuplicityVersion() then
- for i,k in pairs(GetOnlineAdmins()) do
- TriggerClientEvent("EasyAdmin:showNotification", i, string.gsub(msg, "%^%d", ""))
- end
- else
- TriggerEvent("EasyAdmin:showNotification", string.gsub(msg, "%^%d", ""))
- end
- elseif level == 2 and loglevel >= level then -- WARN Loglevel
- Citizen.Trace("^3"..GetCurrentResourceName().."^7: "..msg.."^7\n")
- elseif level == 3 and loglevel >= level then -- INFO Loglevel
- Citizen.Trace("^0"..GetCurrentResourceName().."^7: "..msg.."^7\n")
- elseif level == 4 and loglevel >= level then -- DEV Loglevel
- Citizen.Trace("^7"..GetCurrentResourceName().."^7: "..msg.."^7\n")
- elseif level > 4 and loglevel >= level then -- anything above 4 shouldn't exist, but kept just in case
- Citizen.Trace("^5"..GetCurrentResourceName().."^7: "..msg.."^7\n")
- end
-end
-
-if IsDuplicityVersion() then
- if GetConvar("ea_enableDebugging", "false") ~= "false" or GetConvarInt("ea_logLevel", 1) ~= 1 then
- SetConvar("ea_enableDebugging", "false")
- if GetConvarInt("ea_logLevel", 1) == 1 then
- SetConvar("ea_logLevel", 3)
- end
- if GetConvarInt("ea_logLevel", 1) > 1 then
- PrintDebugMessage("Debug Messages Enabled, Verbosity is ^2"..GetConvarInt("ea_logLevel", 1).."^7.", 2)
- end
- else
- enableDebugging = false
- end
-end
-
-if not IsDuplicityVersion() then
- RegisterNUICallback("keyboardFinished", function(data, cb)
- keyboardResult = data.result
- keyboardState = data.state
- cb('ok')
- end)
-
- function ttsSpeechItem(item)
- local ttsText = ""
- if not item or GetResourceKvpInt('ea_tts') == 0 then return end
- if type(item.Text) == "table" then
- if item.Text._Text then
- ttsText = item.Text._Text
- if item.Label then
- ttsText = ttsText .. ", " .. item.Label.Text._Text
- end
- end
- elseif type(item.Text) == "function" then
- ttsText = item.Base.Text._Text
- if item.Checked == true then
- ttsText = ttsText .. ", Checked"
- elseif item.Checked == false then
- ttsText = ttsText .. ", Unchecked"
- end
- if item.ItemText then
- ttsText = ttsText .. ", " .. item.ItemText._Text
- end
- end
- SendNUIMessage({action= "speak", text=ttsText})
- end
-
- function ttsSpeechText(text)
- if not text or GetResourceKvpInt('ea_tts') == 0 then return end
- SendNUIMessage({action= "speak", text=text})
- end
-end
-
-
-function displayKeyboardInput(title,default,maxLength)
- if alreadyTyping then return nil end
- keyboardResult, keyboardState = nil
- local label = GetLabelText(title)
-
- SetNuiFocus(true, true)
- SendNUIMessage({action= "open", title=label, default=default, maxLength=maxLength, resource=GetCurrentResourceName()})
-
- alreadyTyping = true
-
- while not keyboardState do --While typing is not aborted and not finished, this loop waits
- Citizen.Wait(0)
- end
-
- alreadyTyping = false
- SetNuiFocus(false,false)
- if keyboardState == 0 then
- return keyboardResult
- else
- return nil
- end
-end
-
-function copyToClipboard(text)
- SendNUIMessage({action= "clip", text=text})
- TriggerEvent("EasyAdmin:showNotification", GetLocalisedText("copiedtoclipboard"))
-end
-
-function DoesPlayerHavePermission(player, object)
- if IsDuplicityVersion() then
- local haspermission = false
- if (player == 0 or player == "") then
- return true
- end-- Console. It's assumed this will be an admin with access.
-
- if not string.find(object, "easyadmin.") then -- compatability with outdated plugins
- object = "easyadmin."..object
- end
-
- if IsPlayerAceAllowed(player,object) then -- check if the player has access to this permission
- haspermission = true
- PrintDebugMessage(getName(player, true).." has Permissions for "..object..".", 4)
- else
- haspermission = false
- PrintDebugMessage(getName(player, true).." does not have Permissions for "..object..".", 4)
- end
- return haspermission
- else
- return (permissions[object] or false)
- end
-end
-exports('DoesPlayerHavePermission', DoesPlayerHavePermission)
-
-function DoesPlayerHavePermissionForCategory(player, object)
- for perm in pairs(permissions) do
- if string.startswith(perm, object) then
- if DoesPlayerHavePermission(player, perm) then
- return true
- end
- end
- end
- return false
-end
-exports('DoesPlayerHavePermissionForCategory', DoesPlayerHavePermissionForCategory)
-
-
-function GetVersion()
- local resourceName = GetCurrentResourceName()
- local version = GetResourceMetadata(resourceName, 'version', 0)
- local is_master = GetResourceMetadata(resourceName, 'is_master', 0) == "yes" or false
- return version, is_master
-end
-exports('GetVersion', GetVersion)
-
-
-function loadLanguageStrings()
- local strfile = LoadResourceFile(GetCurrentResourceName(), "language/"..GetConvar("ea_LanguageName", "en")..".json")
- if strfile then
- strings = json.decode(strfile)[1]
- else
- strings = {language=GetConvar("ea_LanguageName", "en")}
- end
-end
-
-function GetLocalisedText(string)
- if not strings then return "Strings not Loaded yet!" end
- if not string then return "No String!" end
- if strings[string] then
- return strings[string]
- else
- return "String "..string.." not found in "..strings.language
- end
-end
-exports('GetLocalisedText', GetLocalisedText)
-
-function formatDateString(string)
- local dateFormat = GetConvar("ea_dateFormat", '%d/%m/%Y %H:%M:%S')
- return os.date(dateFormat, string)
-end
-exports('formatDateString', formatDateString)
-
-function formatShortcuts(thisstring)
- if not thisstring then return thisstring end
- local cleanString = string.gsub(string.lower(thisstring), " ", "")
- for shortcut,value in pairs(MessageShortcuts) do
- if string.lower(shortcut) == cleanString then
- thisstring = value
- end
- end
- return thisstring
-end
-exports('formatShortcuts', formatShortcuts)
-
-function formatRightString(thisstring, customWidth)
- if not thisstring then return thisstring end -- in case string is nil, just yeet it back.
- local width = (customWidth or maxRightTextWidth)
- if string.len(thisstring) > width then
- thisstring = string.sub(thisstring, 1, width)..".."
- end
-
- return thisstring
-end
-
--- some util funcs so i dont have to mess with NativeUI Source Code.
-function getMenuItemTitle(item)
- if (item.Base and type(item.Base.Text) == "table" and item.Base.Text._Text) then
- return item.Base.Text._Text
- elseif (item.Text and type(item.Text) == "table" and item.Text._Text) then
- return item.Text._Text
- end
-end
-
-function setMenuItemTitle(item,text)
- if (item.Base and type(item.Base.Text) == "table" and item.Base.Text._Text) then
- item.Base.Text._Text = text
- elseif (item.Text and type(item.Text) == "table" and item.Text._Text) then
- item.Text._Text = text
- end
-end
-
-function getCachedPlayer(playerId)
- if CachedPlayers[playerId] then
- return CachedPlayers[playerId]
- else
- return false
- end
-end
-exports('getCachedPlayer', getCachedPlayer)
-
-function math.round(num, numDecimalPlaces)
- if numDecimalPlaces and numDecimalPlaces>0 then
- local mult = 10^numDecimalPlaces
- return math.floor(num * mult + 0.5) / mult
- end
- return math.floor(num + 0.5)
-end
-
-function string.split(inputstr, sep)
- if sep == nil then
- sep = "%s"
- end
- local t={} ; i=1
- for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
- t[i] = str
- i = i + 1
- end
- return t
-end
-
-function string.reverse(s)
- local r = ""
- for p,c in utf8.codes(s) do
- r = utf8.char(c)..r
- end
- return r
-end
-
-function string.startswith(string,start)
- return string:sub(1,string.len(start))==start
-end
-
---- http://www.lua.org/pil/11.5.html
-function Set (list)
- local set = {}
- for _, l in ipairs(list) do set[l] = true end
- return set
-end
-
--- Convert a lua table into a lua syntactically correct string
-function table_to_string(tbl)
- return json.encode(tbl)
-end
-
-function mergeTables(t1, t2)
- local t = t1
- for i,v in pairs(t2) do
- table.insert(t, v)
- end
- return t
-end
-
-
--- terrible function to look for URLs in a string
-function matchURL(text_with_URLs)
-
- local domains = [[.ac.ad.ae.aero.af.ag.ai.al.am.an.ao.aq.ar.arpa.as.asia.at.au.aw.ax.az.ba.bb.bd.be.bf.bg.bh.bi.biz.bj.bm.bn.bo.br.bs.bt.bv.bw.by.bz.ca.cat.cc.cd.cf.cg.ch.ci.ck.cl.cm.cn.co.com.coop.cr.cs.cu.cv.cx.cy.cz.dd.de.dj.dk.dm.do.dz.ec.edu.ee.eg.eh.er.es.et.eu.fi.firm.fj.fk.fm.fo.fr.fx.ga.gb.gd.ge.gf.gh.gi.gl.gm.gn.gov.gp.gq.gr.gs.gt.gu.gw.gy.hk.hm.hn.hr.ht.hu.id.ie.il.im.in.info.int.io.iq.ir.is.it.je.jm.jo.jobs.jp.ke.kg.kh.ki.km.kn.kp.kr.kw.ky.kz.la.lb.lc.li.lk.lr.ls.lt.lu.lv.ly.ma.mc.md.me.mg.mh.mil.mk.ml.mm.mn.mo.mobi.mp.mq.mr.ms.mt.mu.museum.mv.mw.mx.my.mz.na.name.nato.nc.ne.net.nf.ng.ni.nl.no.nom.np.nr.nt.nu.nz.om.org.pa.pe.pf.pg.ph.pk.pl.pm.pn.post.pr.pro.ps.pt.pw.py.qa.re.ro.ru.rw.sa.sb.sc.sd.se.sg.sh.si.sj.sk.sl.sm.sn.so.sr.ss.st.store.su.sv.sy.sz.tc.td.tel.tf.tg.th.tj.tk.tl.tm.tn.to.tp.tr.travel.tt.tv.tw.tz.ua.ug.uk.um.us.uy.va.vc.ve.vg.vi.vn.vu.web.wf.ws.xxx.ye.yt.yu.za.zm.zr.zw]]
-
- local tlds = {}
- for tld in domains:gmatch'%w+' do
- tlds[tld] = true
- end
- local function max4(a,b,c,d) return math.max(a+0, b+0, c+0, d+0) end
- local protocols = {[''] = 0, ['http://'] = 0, ['https://'] = 0, ['ftp://'] = 0}
- local finished = {}
-
- for pos_start, url, prot, subd, tld, colon, port, slash, path in
- text_with_URLs:gmatch'()(([%w_.~!*:@&+$/?%%#-]-)(%w[-.%w]*%.)(%w+)(:?)(%d*)(/?)([%w_.~!*:@&+$/?%%#=-]*))'
- do
- if protocols[prot:lower()] == (1 - #slash) * #path and not subd:find'%W%W'
- and (colon == '' or port ~= '' and port + 0 < 65536)
- and (tlds[tld:lower()] or tld:find'^%d+$' and subd:find'^%d+%.%d+%.%d+%.$'
- and max4(tld, subd:match'^(%d+)%.(%d+)%.(%d+)%.$') < 256)
- then
- finished[pos_start] = true
- return url
- end
- end
-
- for pos_start, url, prot, dom, colon, port, slash, path in
- text_with_URLs:gmatch'()((%f[%w]%a+://)(%w[-.%w]*)(:?)(%d*)(/?)([%w_.~!*:@&+$/?%%#=-]*))'
- do
- if not finished[pos_start] and not (dom..'.'):find'%W%W'
- and protocols[prot:lower()] == (1 - #slash) * #path
- and (colon == '' or port ~= '' and port + 0 < 65536)
- then
- return url
- end
- end
-end
-exports('matchURL', matchURL)
\ No newline at end of file