FiveM exports for txAdmin. Ban players using txAdmin instead of using another ban system. With this you can keep all your bans in one place and make moderating way easier!
- Add this to your server's resources folder.
- Create a new txAdmin user with the permissions of the exports you want to use.
- Login to this user to set a password.
- Enter user credentials in
server.js
- Start txApi before all your scripts that use it. You can do this by adding
ensure txApi
to the top of yourserver.cfg
- Restart your server!
- txApi:banPlayer
With this export your can ban players (duh).
Permissions Needed:
- Ban
Arguments:
- Player ID
- Ban Reason (optional)
Here is an example:
exports['txApi']:txApi_banPlayer(69, "It's not your lucky day! You have been banned with txAdmin.")
Here is a todo list of things that need to be added. Feel free to contribute by making a pull request 😊.
- Improve authentication with txAdmin by keeping the session active.
- Add (debug) log function
- Add more exports :)