omp_whitelist is a simple include for open.mp that provides simple and efficient player whitelisting functionality. This include allows server developers to easily implement whitelist verification in their gamemodes by checking player names against a text file.
- Simple Whitelist System: Verifies players against a whitelist file. ✅
- File-Based Storage: Uses a simple text file system for storing whitelisted players. 📜
- Easy Integration: Simple to implement in any gamemode. 🛠️
- Download
omp_whitelist.inc
- Place it in your includes folder
- Create an empty
whitelist.txt
file in your server'sscriptfiles
folder - Include the file in your script:
#include <omp_whitelist>
public OnPlayerConnect(playerid)
{
if (!IsPlayerWhitelisted(playerid))
{
Kick(playerid);
return false;
}
//rest of the code
return true;
}
The whitelist.txt
should contain one player name per line:
Player_Name
BadPlayer
Cool.Player
bool:IsPlayerWhitelisted(playerid)
Returns true
if the player is whitelisted, false
otherwise.
You can change the whitelist file location by defining WHITELIST_FILE
before including the file:
#define WHITELIST_FILE "custom_whitelist.txt"
#include <omp_whitelist>
This project is licensed under the Mozilla Public License 2.0 (MPL 2.0). See the LICENSE file for details.
Contributions are welcome! If you have suggestions for improvements or new features, feel free to create a pull request or open an issue. 🤝
- Dobby - For providing the idea.
- The open.mp community for their invaluable resources and support.