In this tutorial, you'll learn how to set up a custom whitelist on your FiveM server using the Pterodactyl panel (VolticHost Game Panel). This system will restrict server access to approved players by checking their identifiers (e.g., SteamIDs) before they connect, ensuring a controlled roleplay environment. 🚀
📌 Prerequisites
-
A FiveM server purchased at VolticHost.com
-
Access to the Pterodactyl panel (a.k.a. VolticHost Game Panel)
-
Basic knowledge of Lua scripting and server file management
-
A list of approved player identifiers (e.g., SteamIDs)
1️⃣ First Step - Creating the Whitelist Resource
-
Log in to VolticHost Game Panel.
-
Navigate to the File Manager from the main dashboard.
-
Go to the
/resources/
directory. -
Create a new folder named
custom_whitelist
. -
Inside the
custom_whitelist
folder, create a new file namedfxmanifest.lua
and add the following content:fx_version 'cerulean' game 'gta5' author 'YourName' description 'Custom Whitelist System' version '1.0.0' server_script 'whitelist.lua'
-
Save the file.
✅ Whitelist resource folder and manifest created successfully!
2️⃣ Next Step - Uploading the Whitelist Script
-
Inside the
custom_whitelist
folder, create a new file namedwhitelist.lua
. -
Open
whitelist.lua
for editing and paste the following code:-- whitelist.lua -- List of approved identifiers (e.g., SteamIDs, license IDs) local allowedIDs = { "steam:110000100000000", -- Replace with actual IDs "license:1234567890abcdef" -- Replace with actual IDs } AddEventHandler('playerConnecting', function(name, setKickReason, deferrals) deferrals.defer() local src = source local identifiers = GetPlayerIdentifiers(src) local whitelisted = false for _, id in ipairs(identifiers) do for _, allowed in ipairs(allowedIDs) do if id == allowed then whitelisted = true break end end if whitelisted then break end end Wait(0) if not whitelisted then deferrals.done("You are not whitelisted on this server.") else deferrals.done() end end)
-
Customize the
allowedIDs
table with the approved identifiers for your server. -
Save the file.
✅ Whitelist script uploaded and configured successfully!
3️⃣ Next Step - Activating the Whitelist Resource
-
In the Pterodactyl panel, open your
server.cfg
file located in the root directory of your FiveM server. -
Add the following line to ensure your whitelist resource starts with the server:
start custom_whitelist
-
Save your changes.
✅ Whitelist resource added to server configuration successfully!
4️⃣ Next Step - Testing and Verifying the Whitelist
-
Restart your server from the Pterodactyl panel to load the new resource.
-
Attempt to connect to your server:
-
If your identifier is not in the
allowedIDs
list, you should see a kick message stating "You are not whitelisted on this server." -
If your identifier is approved, you should connect without any issues.
-
-
Verify that the whitelist functions correctly by testing with different identifiers if possible.
✅ Whitelist functionality tested and verified successfully!
🎉 Conclusion
You have now successfully created and implemented a custom whitelist on your FiveM server using the Pterodactyl (VolticHost Game) panel! This setup helps you maintain a secure and exclusive roleplay environment by allowing only approved players to connect. 🚀
For more assistance, contact VolticHost Support.