|
1 | 1 | # discord-screenshot |
2 | 2 |
|
3 | | -<p> |
4 | | - <a href="https://github.com/GHMatti/ghmattimysql/blob/master/license.md"> |
5 | | - <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"> |
6 | | - </a> |
| 3 | +<p align="center"> |
| 4 | + <a href="https://github.com/GHMatti/ghmattimysql/blob/master/license.md"> |
| 5 | + <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"> |
| 6 | + </a> |
| 7 | + <a href="https://discord.gg/z6Yx9A8VDR"> |
| 8 | + <img src="https://discordapp.com/api/guilds/514185816315265068/widget.png" alt="Chat"> |
| 9 | + </a> |
7 | 10 | </p> |
8 | 11 |
|
9 | | -<p> |
10 | | - <a href="https://discord.gg/z6Yx9A8VDR"> |
11 | | - <img src="https://discordapp.com/api/guilds/514185816315265068/widget.png?style=banner2" alt="Chat"> |
12 | | - </a> |
13 | | -</p> |
14 | | - |
15 | | -> You can also read this README in [Portuguese](https://github.com/jaimeadf/discord-screenshot/blob/master/README.pt.md). |
| 12 | +> You can also read this in [Portuguese](https://github.com/jaimeadf/discord-screenshot/blob/master/README.pt.md). |
16 | 13 |
|
17 | | -`discord-screenshot` is a resource for [FiveM](https://fivem.net) that captures a screenshot of a player and upload it to a discord's webhook. |
| 14 | +`discord-screenshot` is a resource for [FiveM](https://fivem.net) that capture the screen of a player and upload it to a discord's webhook. |
18 | 15 |
|
19 | | -[](https://youtu.be/c9h40LoLky8) |
| 16 | +[](https://youtu.be/c9h40LoLky8) |
20 | 17 |
|
21 | | -## Setup |
| 18 | +## Installation |
22 | 19 | 1. Make sure your artifacts ([windows](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master) or [linux](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master)) are up to date. |
23 | 20 | 2. Extract the latest zip file at [releases](https://github.com/jaimeadf/discord-screenshot/releases) in your resources folder. |
24 | 21 | 3. Add `ensure screenshot-basic` and `ensure discord-screenshot` in your `server.cfg`. |
25 | 22 | 4. Adjust the [configuration](#configuration) of the resource in the `settings.json`. |
26 | 23 |
|
27 | 24 | ## Configuration |
28 | 25 |
|
29 | | -* **webhookUrl**: The url of your discord's webhook. |
30 | | -* **framework**: The framework you are using (`vrp` or `none`). |
31 | | -* **commandName**: The command name. |
32 | | -* **commandPermission**: The permission to use the command. |
| 26 | +* **webhookUrl** - The url of your discord's webhook. |
| 27 | +* **framework** - The framework you are using (`vrp` or `none`). |
| 28 | +* **commandName** - The command name. |
| 29 | +* **commandPermission** - The permission to use the command. |
33 | 30 | * **screenshotOptions** |
34 | | - * **encoding**: The file format (`png`, `jpg` or `webp`) |
35 | | - * **quality**: The image quality from 0 to 1. |
| 31 | + * **encoding** - The file format (`png`, `jpg` or `webp`) |
| 32 | + * **quality** - The image quality from 0.0 to 1.0. |
36 | 33 |
|
37 | | -## Usage |
| 34 | +## Default usage |
38 | 35 |
|
39 | 36 | > **Note:** If you pass `-1` as target, the screen of all the players will be captured. |
40 | 37 |
|
41 | 38 | ### Standalone |
42 | 39 |
|
43 | 40 | #### /screenshot <player ou identifier> |
44 | 41 |
|
45 | | -Can be used via console or by anyone with the ace permission `discord.screenshot`. |
| 42 | +Can be used via the server console or by anyone with the ace permission `command.screenshot`. |
46 | 43 |
|
47 | 44 | ### vRP |
48 | 45 |
|
49 | 46 | #### /screenshot <user_id> |
50 | 47 |
|
51 | | -Can be used via console or by anyone with the permission `discord.screenshot`. |
| 48 | +Can be used via the server console or by anyone with the permission `command.screenshot`. |
52 | 49 |
|
53 | 50 | ## Exports |
54 | 51 |
|
@@ -84,7 +81,7 @@ exports["discord-screenshot"]:requestClientScreenshotUploadToDiscord( |
84 | 81 | }, |
85 | 82 | function(error) |
86 | 83 | if error then |
87 | | - return print("^7" .. error) |
| 84 | + return print(error) |
88 | 85 | end |
89 | 86 | print("Sent screenshot successfully") |
90 | 87 | end |
|
0 commit comments