This a FiveM "anticheat" script utilizing the screenshot-basic resource by citizenfx. You NEED screenshot-basic and TxAdmin on your server for this script to work as intended.
The script will capture a screenshot of a user's game whenever they cause or is killed by an explosion. The screenshot will be sent to a discord channel via a webhook along with some other info for identification purposes. The screenshot should theoretically show any modmenus or other tools modders use that is drawn in/on the game.
- Clone or download this repository and put it in your server resource folder
- Clone or download screenshot-basic and put it in your resource folder
- Go to your discord logging channel, make a webhook and copy it. There's two parts of that link we're interested in; the webhook ID and the webhook token. (See the pic below)
- Add the webhook ID and token to the config file (src/server/config.json)
- Add
ensure pAnticheat
andensure screenshot-basic
to yourserver.cfg
file
Allows 3rd party resources to trigger the script.
//Source of the player you want to get a screenshot from
let source = 1;
//Title for the discord embed
let title = 'Screenshot triggered by export';
exports.pAnticheat.sendScreenshot(src, title);