๐Ÿ“ฆ GJSBRT / txApi

FiveM exports for txAdmin

โ˜… 4 stars โ‘‚ 3 forks ๐Ÿ‘ 4 watching โš–๏ธ GNU General Public License v3.0
apiexportsfivemjavascriptluatxadmintxapi
๐Ÿ“ฅ Clone https://github.com/GJSBRT/txApi.git
HTTPS git clone https://github.com/GJSBRT/txApi.git
SSH git clone git@github.com:GJSBRT/txApi.git
CLI gh repo clone GJSBRT/txApi
Gijsbert Gijsbert Merge branch 'main' of https://github.com/GJSBRT/txApi 6eacc8a 3 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“„ .gitattributes
๐Ÿ“„ fxmanifest.lua
๐Ÿ“„ LICENSE
๐Ÿ“„ readme.md
๐Ÿ“„ server.js
๐Ÿ“„ README.md

txApi

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!

Installation

  • 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 your server.cfg
  • Restart your server!

Exports

  • txApi:banPlayer

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.")

Todo

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 :)