Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: esx_allowlist #667

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
674 changes: 674 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/LICENSE

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<h1 align='center'>[ESX] Allowlist</a></h1><p align='center'><b><a href='https://discord.esx-framework.org/'>Discord</a> - <a href='https://documentation.esx-framework.org/legacy/installation'>Documentation</a></b></h5>

block those evil intruders with ESX Allowlist!
This Script allows you to block all players from joining and specify the only players who can join!

## Legal

esx_allowlist- block those evil intruders!

Copyright (C) 2023-2024 ESX-Framework

This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.

This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.

You should have received a copy Of the GNU General Public License along with this program. If Not, see <http://www.gnu.org/licenses/>.
4 changes: 4 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Config = {}

Config.Locale = GetConvar('esx:locale', 'en')
Config.MinPlayer = 10 --Set how many players need to be connect before whitelist start, 0-32
19 changes: 19 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
fx_version 'adamant'

game 'gta5'

author 'ESX-Framework'
description 'An Allow-list system for ESX that lets you only allow specific people join your server.'

version '1.0.1'

lua54 'yes'
server_only 'yes'

server_scripts {
'@es_extended/imports.lua',
'@es_extended/locale.lua',
'config.lua',
'locales/*.lua',
'server/main.lua'
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/cs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['cs'] = {
['allowlist_check'] = 'Kontroluji, zda máš přístup.',
['not_allowlisted'] = 'K tomuto serveru nemáš přístup!',
['allowlist_empty'] = 'Na tomto serveru nejsou žádný seznam přístupu.',
['license_missing'] = 'Chyba: Chybí licence (identifier)!',
['help_allowlist_add'] = 'přidat někoho do seznamu přístupu',
['help_allowlist_load'] = 'obnovit seznam přístupu',
['help_allowlist_remove'] = 'odebrat někoho ze seznamu přístupu',
['error'] = 'Nastala chyba. Kontaktuj majitele serveru!',
['already_allowlisted'] = 'Tomuto hráči již přístup byl udělen!',
['license'] = 'licence',
['help_license'] = 'licence hráče',
['identifier_not_allowlisted'] = 'Tato licence není na seznamu přístupu!',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/de.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['de'] = {
['allowlist_check'] = 'Überprüfen ob du Allowlisted bist.',
['not_allowlisted'] = 'Du musst Allowlisted sein, um auf den Server zu joinen!',
['allowlist_empty'] = 'Es gibt keine gespeicherten Allowlists für diesen Server.',
['license_missing'] = 'Fehler: Dein Identifier fehlt!',
['help_allowlist_add'] = 'fügt jemanden zur allowlist hinzu',
['help_allowlist_load'] = 'lädt die allowlist neu',
['help_allowlist_remove'] = 'jemanden von der allowlist entfernen',
['error'] = 'Es gab einen Fehler! Bitte melde dich bei dem Server-Owner!',
['already_allowlisted'] = 'Dieser Spieler ist bereits allowlisted!',
['license'] = 'license',
['help_license'] = 'Spieler\'s Lizenz',
['identifier_not_allowlisted'] = 'Identifier ist nicht allowlisted auf diesem Server!',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/el.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['el'] = {
['allowlist_check'] = 'Γίνεται έλεγχος εάν είστε στη λίστα επιτρεπόμενων.',
['not_allowlisted'] = 'Πρέπει να είστε στη λίστα επιτρεπόμενων για να συνδεθείτε σε αυτόν τον διακομιστή!',
['allowlist_empty'] = 'Δεν υπάρχουν λίστες επιτρεπόμενων αποθηκευμένες για αυτόν τον διακομιστή.',
['license_missing'] = 'Σφάλμα: Λείπει ο αναγνωριστικός σας κωδικός!',
['help_allowlist_add'] = 'Προσθέστε κάποιον στη λίστα επιτρεπόμενων',
['help_allowlist_load'] = 'Επαναφόρτωση της λίστας επιτρεπόμενων',
['help_allowlist_remove'] = 'Αφαιρέστε κάποιον από τη λίστα επιτρεπόμενων',
['error'] = 'Παρουσιάστηκε ένα σφάλμα, παρακαλώ επικοινωνήστε με τον ιδιοκτήτη του διακομιστή!',
['already_allowlisted'] = 'Ο παίκτης είναι ήδη στη λίστα επιτρεπόμενων σε αυτόν τον διακομιστή!',
['license'] = 'Αναγνωριστικός κωδικός',
['help_license'] = 'Ο αναγνωριστικός κωδικός του παίκτη',
['identifier_not_allowlisted'] = 'Ο αναγνωριστικός κωδικός δεν είναι στη λίστα επιτρεπόμενων σε αυτόν τον διακομιστή!',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/en.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['en'] = {
['allowlist_check'] = 'Checking if you are Allowlisted.',
['not_allowlisted'] = 'You Must be Allowlisted to join this server!',
['allowlist_empty'] = 'There Are no allowlists saved for this server.',
['license_missing'] = 'Error: Your Identifier is missing!',
['help_allowlist_add'] = 'add someone to the allowlist',
['help_allowlist_load'] = 'reload the allowlist',
['help_allowlist_remove'] = 'remove someone from the allowlist',
['error'] = 'There Was An Error, Please Contact the server owner!',
['already_allowlisted'] = 'The player is already allowlisted on this server!',
['license'] = 'license',
['help_license'] = 'the player license',
['identifier_not_allowlisted'] = 'Identifier is not Allowlisted on this server!',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/es.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['es'] = {
['allowlist_check'] = 'revisando si tienes la allowlist . . .',
['not_allowlisted'] = 'no tenes la allowlist en este servidor',
['allowlist_empty'] = 'La allowlist todavia no cargo, o alternativamente nadie la tiene',
['license_missing'] = 'no se pudo encontrar tu licencia',
['help_allowlist_add'] = 'agregar a la allowlist',
['help_allowlist_load'] = 'recargar allowlist',
['help_allowlist_remove'] = 'remove someone from the allowlist', --not translated
['error'] = 'There Was An Error, Please Contact the server owner!', --not translated
['already_allowlisted'] = 'The player is already allowlisted on this server!', --not translated
['license'] = 'license', --not translated
['help_license'] = 'the player license', --not translated
['identifier_not_allowlisted'] = 'Identifier is not Allowlisted on this server!', --not translated
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/fi.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['fi'] = {
['allowlist_check'] = 'Tarkistetaan onko sinulla oleskelulupaa.',
['not_allowlisted'] = 'Sinulla on oltava oleskelulupa, jotta voit liittyä palvelimelle!',
['allowlist_empty'] = 'Tälle palvelimelle ei ole tallennettuja oleskelulupia.',
['license_missing'] = 'Virhe: Tunistettasi ei löydetä!',
['help_allowlist_add'] = 'Lisää jollekulle oleskelulupa',
['help_allowlist_load'] = 'Lataa oleskelulupa uudelleen',
['help_allowlist_remove'] = 'remove someone from the allowlist', --not translated
['error'] = 'There Was An Error, Please Contact the server owner!', --not translated
['already_allowlisted'] = 'The player is already allowlisted on this server!', --not translated
['license'] = 'license', --not translated
['help_license'] = 'the player license', --not translated
['identifier_not_allowlisted'] = 'Identifier is not Allowlisted on this server!', --not translated
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/fr.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['fr'] = {
['allowlist_check'] = 'Êtes vous sûr d\'être allowlisté sur ce serveur ...',
['not_allowlisted'] = 'Ce serveur utilise une allowlist',
['allowlist_empty'] = 'La allowlist n\'a pas été rechargé ou vous n\'avez pas été allowlisté',
['license_missing'] = 'Votre license est introuvable',
['help_allowlist_add'] = 'Ajouter un joueur à la Whitelist',
['help_allowlist_load'] = 'Recharger la Whitelist',
['help_allowlist_remove'] = 'retirer quelqu\'un de la liste blanche',
['error'] = 'Une erreur est survenue, veuillez contacter le propriétaire du serveur !',
['already_allowlisted'] = 'Le joueur est déjà sur la liste blanche de ce serveur !',
['license'] = 'licence',
['help_license'] = 'la licence du joueur',
['identifier_not_allowlisted'] = 'L\'identifiant n\'est pas sur la liste blanche de ce serveur !'
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/hu.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['hu'] = {
['allowlist_check'] = 'Ellenőrizzük fent vagy-e a engedélyezettek listáján.',
['not_allowlisted'] = 'Engedélyezettnek kell lenned ahhoz, hogy csatlakozz ehhez a szerverhez!',
['allowlist_empty'] = 'Ehhez a szerverhez nincsenek mentett engedélyezési listák.',
['license_missing'] = 'Hiba: Te azonosítód hiányzik!',
['help_allowlist_add'] = 'játékos felvétele az engedélyezettek listájára',
['help_allowlist_remove'] = 'játékos törlése az engedélyezettek listájáról',
['help_allowlist_load'] = 'engedélyezési lista újratöltése',
['error'] = 'Hiba történt, keresd fel a szerver tulajdonosát!',
['already_allowlisted'] = 'A játékos már engedélyezett!',
['license'] = 'licenc',
['help_license'] = 'játékos licenc',
['identifier_not_allowlisted'] = 'A licenc nem engedélyezett a szerveren!',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/it.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['it'] = {
['allowlist_check'] = 'verifica Allowlist.',
['not_allowlisted'] = 'devi essere nella Allowlist per unirti a questo server!',
['allowlist_empty'] = 'non ci sono allowlist salvate per questo server.',
['license_missing'] = 'Errore: il tuo identificatore è mancante!',
['help_allowlist_add'] = 'aggiungi qualcuno alla allowlist',
['help_allowlist_load'] = 'ricarica la allowlist',
['help_allowlist_remove'] = 'rimuovi un utente dalla allowlist',
['error'] = 'É stato riscontrato un errore, contatta il proprietario del server!',
['already_allowlisted'] = 'Il giocatore è già allowlistato nel server',
['license'] = 'licenza',
['help_license'] = 'la licenza del giocatore',
['identifier_not_allowlisted'] = 'L\' identificativo non è allowlistato nel server',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/nl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['nl'] = {
['allowlist_check'] = 'Je toegangspas aan het controleren.',
['not_allowlisted'] = 'Je moet een toegangspas hebben om op deze server te spelen!',
['allowlist_empty'] = 'Er zijn geen toegangspassen uitgegeven.',
['license_missing'] = 'Error: Je Identifier mist!',
['help_allowlist_add'] = 'geef iemand een toegangspas',
['help_allowlist_load'] = 'herlaad de toegangspassen',
['help_allowlist_remove'] = 'verwijder iemand zijn toegangspas',
['error'] = 'Er is een fout opgetreden, contacteer de server eigenaar !',
['already_allowlisted'] = 'De speler heeft al een toegangspas op deze server!',
['license'] = 'licentie',
['help_license'] = 'de speler zijn licentie',
['identifier_not_allowlisted'] = 'Deze identifier heeft geen toegangspas op deze server!',
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/pl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['pl'] = {
['allowlist_check'] = 'Sprawdzamy, czy jesteś na Allowlist.',
['not_allowlisted'] = 'Aby dołączyć do tego serwera, musisz być na Allowlist!',
['allowlist_empty'] = 'Brak zapisanych list Allowlist dla tego serwera.',
['license_missing'] = 'Błąd: Brak ID!',
['help_allowlist_add'] = 'dodaj do allowlist',
['help_allowlist_load'] = 'przeładuj allowlist',
['help_allowlist_remove'] = 'remove someone from the allowlist', --not translated
['error'] = 'There Was An Error, Please Contact the server owner!', --not translated
['already_allowlisted'] = 'The player is already allowlisted on this server!', --not translated
['license'] = 'license', --not translated
['help_license'] = 'the player license', --not translated
['identifier_not_allowlisted'] = 'Identifier is not Allowlisted on this server!', --not translated
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/sl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['sl'] = {
['allowlist_check'] = 'Preveerjanje Seznama Dovoljenih...',
['not_allowlisted'] = 'Če se želite povezati na strežnik, morate biti Dovoljeni iz strani Administracije!',
['allowlist_empty'] = 'Dovoljenih ni najdenih...',
['license_missing'] = 'Napaka: Manjka vaš identifikator!',
['help_allowlist_add'] = 'Dodaj nekoga ne seznam Dovoljenih.',
['help_allowlist_load'] = 'Ponovno naložite listo!',
['help_allowlist_remove'] = 'remove someone from the allowlist', --not translated
['error'] = 'There Was An Error, Please Contact the server owner!', --not translated
['already_allowlisted'] = 'The player is already allowlisted on this server!', --not translated
['license'] = 'license', --not translated
['help_license'] = 'the player license', --not translated
['identifier_not_allowlisted'] = 'Identifier is not Allowlisted on this server!', --not translated
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/sr.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['sr'] = {
['allowlist_check'] = 'Proveravam da li ste na listi dozvoljenih.',
['not_allowlisted'] = 'Morate biti na listi dozvoljenih na serveru!',
['allowlist_empty'] = 'Nema sačuvanih lista dozvoljenih za ovaj server.',
['license_missing'] = 'Greška: Vaš identifikator nedostaje!',
['help_allowlist_add'] = 'dodajte nekoga na listu dozvoljenih igrača',
['help_allowlist_load'] = 'ponovo učitajte listu dozvoljenih igrača',
['help_allowlist_remove'] = 'skini nekoga sa liste dozvoljenih',
['error'] = 'Desila je se greska, kontaktirajte vlasnika servera!',
['already_allowlisted'] = 'Igrac je vec na listi dozvoljenih servera!',
['license'] = 'licenca',
['help_license'] = 'licenca igraca',
['identifier_not_allowlisted'] = 'Vas identifikator nije na listi dozvoljenih!'
}
14 changes: 14 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/sv.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['sv'] = {
['allowlist_check'] = 'Kollar om du är allowlistad.',
['not_allowlisted'] = 'Du måste vara allowlistad för att joina servern!',
['allowlist_empty'] = 'Det är inga allowlistade på denna server.',
['license_missing'] = 'Fel: Din Identifier saknas!',
['help_allowlist_add'] = 'Sätt någon som allowlist',
['help_allowlist_load'] = 'Ladda om allowlist',
['help_allowlist_remove'] = 'Ta bort någons allowlist',
['error'] = 'Det blev ett fel, kontakta server ägaren!',
['already_allowlisted'] = 'Spelaren är redan allowlistad på denna server!',
['license'] = 'License',
['help_license'] = 'Spelarens license',
['identifier_not_allowlisted'] = 'Identifier är inte allowlistad på denna server!',
}
15 changes: 15 additions & 0 deletions server-data/resources/[esx_addons]/esx_allowlist/locales/tr.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Locales['tr'] = {
['allowlist_check'] = 'Allowlist durumunuz kontrol ediliyor.',
['not_allowlisted'] = 'Bu sunucuya katılmak için Allowlist olmanız gerekmektedir!',
['allowlist_empty'] = 'Bu sunucu için kayıtlı bir Allowlist bulunmuyor.',
['license_missing'] = 'Hata: Tanımlayıcınız eksik!',
['help_allowlist_add'] = 'Allowlist\'e birini eklemek için',
['help_allowlist_load'] = 'Allowlist\'i yeniden yüklemek için',
['help_allowlist_remove'] = 'Allowlist\'den birini kaldırmak için',
['error'] = 'Bir hata oluştu, lütfen sunucu sahibi ile iletişime geçin!',
['already_allowlisted'] = 'Oyuncu zaten bu sunucuda Allowlist\'te bulunuyor!',
['license'] = 'lisans',
['help_license'] = 'oyuncu lisansı',
['identifier_not_allowlisted'] = 'Tanımlayıcı bu sunucuda Allowlist\'te bulunmuyor!',
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Locales['zh-cn'] = {
['allowlist_check'] = '检查您是否得到白名单批准.',
['not_allowlisted'] = '您必须得到白名单批准方可加入此服务器!',
['allowlist_empty'] = '该服务器没有开启白名单.',
['license_missing'] = '错误:您的标识符丢失或未找到了!',
['help_allowlist_add'] = '将某人添加到白名单中',
['help_allowlist_load'] = '重新加载白名单',
['help_allowlist_remove'] = 'remove someone from the allowlist', --not translated
['error'] = 'There Was An Error, Please Contact the server owner!', --not translated
['already_allowlisted'] = 'The player is already allowlisted on this server!', --not translated
['license'] = 'license', --not translated
['help_license'] = 'the player license', --not translated
['identifier_not_allowlisted'] = 'Identifier is not Allowlisted on this server!', --not translated
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function OpenPoliceActionsMenu()
while currentTask.busy do
Wait(1000)

vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
vehicle = ESX.Game.GetClosestVehicle(coords)
if not DoesEntityExist(vehicle) and currentTask.busy then
ESX.ShowNotification(_U("impound_canceled_moved"))
ESX.ClearTimeout(currentTask.task)
Expand Down
Loading