Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 3d711e5

Browse files
author
Søren Eskildsen
committed
Initial Release
1 parent 5450dc7 commit 3d711e5

File tree

7 files changed

+495
-2
lines changed

7 files changed

+495
-2
lines changed

README.md

+63-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,63 @@
1-
# DRP_WHITELIST
2-
Just another whitelist system – but done my way!
1+
# [Beta] DRP_WHITELIST - v1.0
2+
**Version:** 1.0
3+
**Created by:** BenZoN - DanishRP
4+
5+
**Requirements DRP_WHITELIST**
6+
7+
[fivem-mysql-async v3.0.x](https://github.com/brouznouf/fivem-mysql-async)
8+
[Essentialmode](https://essentialmode.com/)
9+
10+
**Note**
11+
12+
This is in BETA, would love some feedback on the system when tested on FiveM Forums
13+
14+
**Description**
15+
16+
This is just another MySQL Whitelist script, but done the way I wanted a whitelist script to work.
17+
18+
Most whitelist scripts I have tried, where either missing the feature to add SteamID’s or License ID’s on the fly, with out having to run a reload command, or restart the script, and you had to convert the SteamID to hex.
19+
20+
And that is why I created this script, it supports adding steam id’s with out having to convert them to hex, and it support’s the usage of license identifier to, the in-game commands are based on essentialmode, but it features rcon commands to, and from what I read they support’s ace permissions, so it can be made a standalone release quite easy.
21+
22+
But I don't got enough experience with ace permissions, I would love to hear more about it, so I can do a 100% standalone release.
23+
24+
Supports translation - credits: [es_extended](https://github.com/ESX-Org/es_extended)
25+
26+
**Features**
27+
- Supports SteamID64 (steam:*****************)
28+
- Supports License ID (license:**)
29+
- Simple SteamID validation counts numbers after steam: should be 17
30+
- Simple License ID validation counts numbers/letter after license: should be 40
31+
- Supports rcon commands
32+
- Remove SteamID and License ID via rcon and essentialmode command
33+
- You can remove SteamID’s in 64 format or in HEX format!
34+
35+
**Installation DRP_WHITELIST**
36+
- Download - https://github.com/benzon/DRP_WHITELIST/archive/master.zip
37+
- Put it in the `resources` directory
38+
- Add this to your `server.cfg`:
39+
```
40+
start DRP_WHITELIST
41+
```
42+
43+
**Commands**
44+
- /addwl ID (ex. steam:76561197960287930)
45+
- /removewl ID (ex. steam:76561197960287930 or steam:1100001000056ba)
46+
- rconaddwl ID (ex. license:xxx)
47+
- rconremovewl ID (ex. license:xxx or steam:76561197960287930)
48+
49+
**Credits/Inspiration**
50+
essentialmode - The way there ban system is done where an inspiration to validate the whitelist.
51+
WhiteList DB (Async) 2.0 - Inspiration to add rcon command, sadly this release is out of date and got some bugs.
52+
es_extended - Credits for locale.lua (It's only included in the release to make it more standalone, and not require esx)
53+
54+
## Legal
55+
DRP_WHITELIST - DRP Whitelist
56+
57+
Copyright (C) 2015-2019 BenZoN
58+
59+
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.
60+
61+
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.
62+
63+
You should have received a copy Of the GNU General Public License along with this program. If Not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).

__resource.lua

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
2+
3+
description 'DRP Whitelist'
4+
5+
version '1.0'
6+
7+
server_scripts {
8+
'@mysql-async/lib/MySQL.lua',
9+
'locale.lua', -- Credit es_extended
10+
'locales/da.lua',
11+
'locales/en.lua',
12+
'config.lua',
13+
'server/server.lua'
14+
}

config.lua

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Config = {}
2+
Config.Locale = 'da' -- Localisation

locale.lua

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Locales = {}
2+
3+
function _(str, ...) -- Translate string
4+
5+
if Locales[Config.Locale] ~= nil then
6+
7+
if Locales[Config.Locale][str] ~= nil then
8+
return string.format(Locales[Config.Locale][str], ...)
9+
else
10+
return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist'
11+
end
12+
13+
else
14+
return 'Locale [' .. Config.Locale .. '] does not exist'
15+
end
16+
17+
end
18+
19+
function _U(str, ...) -- Translate string first char uppercase
20+
return tostring(_(str, ...):gsub("^%l", string.upper))
21+
end

locales/da.lua

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Locales['da'] = {
2+
['not_whitelisted'] = 'Du er ikke whitelisted',
3+
4+
['permissions'] = 'Du har ikke rettigheder til at benytte denne funktion!',
5+
6+
['addwl_help_text'] = 'Tilføj et ID til whitelist',
7+
['removewl_help_text'] = 'Fjern et ID fra whitelist',
8+
['wl_help_text_param'] = 'Format steam:*** eller license:**',
9+
10+
['added_to_whitelist'] = 'ID\'et blev tilføjet til whitelist %s',
11+
['removed_from_whitelist'] = 'ID\'et blev fjernet til whitelist %s',
12+
13+
['already_whitelisted'] = 'ID\'et er allerede whitelisted',
14+
['is_not_whitelisted'] = 'ID\'et er ikke whitelisted',
15+
16+
['not_valid_steamid'] = 'Ikke et gyldigt SteamID',
17+
['not_valid_license'] = 'Ikke et gyldigt License ID',
18+
19+
['invalid_id'] = 'Ugyldig indtasting husk steam: eller license:',
20+
['invalid_entry'] = 'Identifier mangler'
21+
}

locales/en.lua

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Locales['en'] = {
2+
['not_whitelisted'] = 'You are not whitelisted',
3+
4+
['permissions'] = 'Insufficienct permissions!',
5+
6+
['addwl_help_text'] = 'Add an ID to the whitelist',
7+
['removewl_help_text'] = 'Remove an ID from the whitelist',
8+
['wl_help_text_param'] = 'Format steam:*** or license:**',
9+
10+
['added_to_whitelist'] = 'The ID where added to the whitelist - %s',
11+
['removed_from_whitelist'] = 'The ID where removed from the whitelist - %s',
12+
13+
['already_whitelisted'] = 'The ID is already whitelisted',
14+
['is_not_whitelisted'] = 'The ID is not whitelisted',
15+
16+
['not_valid_steamid'] = 'Not a valid SteamID',
17+
['not_valid_license'] = 'Not a valid License ID',
18+
19+
['invalid_id'] = 'Invalid entry remember steam: or license:',
20+
['invalid_entry'] = 'Missing Identifier'
21+
}

0 commit comments

Comments
 (0)