Skip to content

Commit

Permalink
Update README and package description
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeadf committed Dec 12, 2020
1 parent 7da3ffb commit 23ab807
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 48 deletions.
45 changes: 21 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,51 @@
# discord-screenshot

<p>
<a href="https://github.com/GHMatti/ghmattimysql/blob/master/license.md">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
</a>
<p align="center">
<a href="https://github.com/GHMatti/ghmattimysql/blob/master/license.md">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
</a>
<a href="https://discord.gg/z6Yx9A8VDR">
<img src="https://discordapp.com/api/guilds/514185816315265068/widget.png" alt="Chat">
</a>
</p>

<p>
<a href="https://discord.gg/z6Yx9A8VDR">
<img src="https://discordapp.com/api/guilds/514185816315265068/widget.png?style=banner2" alt="Chat">
</a>
</p>

> You can also read this README in [Portuguese](https://github.com/jaimeadf/discord-screenshot/blob/master/README.pt.md).
> You can also read this in [Portuguese](https://github.com/jaimeadf/discord-screenshot/blob/master/README.pt.md).
`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.
`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.

[![Showcase](https://img.youtube.com/vi/c9h40LoLky8/maxresdefault.jpg)](https://youtu.be/c9h40LoLky8)
[![Showcase](https://yt-embed.herokuapp.com/embed?v=c9h40LoLky8)](https://youtu.be/c9h40LoLky8)

## Setup
## Installation
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.
2. Extract the latest zip file at [releases](https://github.com/jaimeadf/discord-screenshot/releases) in your resources folder.
3. Add `ensure screenshot-basic` and `ensure discord-screenshot` in your `server.cfg`.
4. Adjust the [configuration](#configuration) of the resource in the `settings.json`.

## Configuration

* **webhookUrl**: The url of your discord's webhook.
* **framework**: The framework you are using (`vrp` or `none`).
* **commandName**: The command name.
* **commandPermission**: The permission to use the command.
* **webhookUrl** - The url of your discord's webhook.
* **framework** - The framework you are using (`vrp` or `none`).
* **commandName** - The command name.
* **commandPermission** - The permission to use the command.
* **screenshotOptions**
* **encoding**: The file format (`png`, `jpg` or `webp`)
* **quality**: The image quality from 0 to 1.
* **encoding** - The file format (`png`, `jpg` or `webp`)
* **quality** - The image quality from 0.0 to 1.0.

## Usage
## Default usage

> **Note:** If you pass `-1` as target, the screen of all the players will be captured.
### Standalone

#### /screenshot &lt;player ou identifier&gt;

Can be used via console or by anyone with the ace permission `discord.screenshot`.
Can be used via the server console or by anyone with the ace permission `command.screenshot`.

### vRP

#### /screenshot &lt;user_id&gt;

Can be used via console or by anyone with the permission `discord.screenshot`.
Can be used via the server console or by anyone with the permission `command.screenshot`.

## Exports

Expand Down Expand Up @@ -84,7 +81,7 @@ exports["discord-screenshot"]:requestClientScreenshotUploadToDiscord(
},
function(error)
if error then
return print("^7" .. error)
return print(error)
end
print("Sent screenshot successfully")
end
Expand Down
42 changes: 19 additions & 23 deletions README.pt.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
# discord-screenshot

<p>
<a href="https://github.com/GHMatti/ghmattimysql/blob/master/license.md">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
</a>
<p align="center">
<a href="https://github.com/GHMatti/ghmattimysql/blob/master/license.md">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
</a>
<a href="https://discord.gg/z6Yx9A8VDR">
<img src="https://discordapp.com/api/guilds/514185816315265068/widget.png" alt="Chat">
</a>
</p>

<p>
<a href="https://discord.gg/z6Yx9A8VDR">
<img src="https://discordapp.com/api/guilds/514185816315265068/widget.png?style=banner2" alt="Chat">
</a>
</p>


`discord-screenshot` é um resource para [FiveM](https://fivem.net) que captura a tela de um player e a upa para o webhook do discord.

[![Showcase](https://img.youtube.com/vi/c9h40LoLky8/maxresdefault.jpg)](https://youtu.be/c9h40LoLky8)
[![Showcase](https://yt-embed.herokuapp.com/embed?v=c9h40LoLky8)](https://youtu.be/c9h40LoLky8)

## Setup
## Instalação
1. Certifique-se que seus artefatos ([windows](https://runtime.fivem.net/artifacts/fivem/build_server_windows/master) ou [linux](https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master)) estão atualizados.
2. Extraia o último arquivo zip em [releases](https://github.com/jaimeadf/discord-screenshot/releases) na sua pasta resources.
3. Adicione `ensure screenshot-basic` e `ensure discord-screenshot` no seu `server.cfg`.
4. Ajuste a [configuração](#configuração) do resource no `settings.json`.

## Configuração

* **webhookUrl**: A url do seu webhook do discord.
* **framework**: A framework que você está usando (`vrp` ou `none`).
* **commandName**: O nome do comando.
* **commandPermission**: A permissão para usar o comando.
* **webhookUrl** - A url do seu webhook do discord.
* **framework** - A framework que você está usando (`vrp` ou `none`).
* **commandName** - O nome do comando.
* **commandPermission** - A permissão para usar o comando.
* **screenshotOptions**
* **encoding**: O formato do arquivo (`png`, `jpg` ou `webp`)
* **quality**: A qualidade da imagem de 0 a 1.
* **encoding** - O formato do arquivo (`png`, `jpg` ou `webp`)
* **quality** - A qualidade da imagem de 0.0 a 1.0.

## Uso
## Uso padrão

> **Nota:** Se você passar `-1` como alvo, a tela de todos os jogadores será capturada.
### Standalone

#### /screenshot &lt;player ou identifier&gt;

Pode ser usado pelo console ou por qualquer um com a permissão ace `discord.screenshot`.
Pode ser usado pelo console do servidor ou por qualquer um com a permissão ace `command.screenshot`.

### vRP

#### /screenshot &lt;user_id&gt;

Pode ser usado pelo console ou por qualquer um com a permissão `discord.screenshot`.
Pode ser usado pelo console do servidor ou por qualquer um com a permissão `command.screenshot`.

## Exports

Expand Down Expand Up @@ -130,7 +126,7 @@ exports["discord-screenshot"]:requestCustomClientScreenshotUploadToDiscord(
},
function(error)
if error then
return print("^7" .. error)
return print(error)
end
print("Sent screenshot successfully")
end
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "discord-screenshot",
"version": "1.3.1",
"description": "A resource for FiveM and RedM that takes a screenshot of a player and uploads it to a discord's webhook.",
"description": ":",
"main": "index.js",
"scripts": {
"dev": "webpack --watch --mode development",
Expand Down

0 comments on commit 23ab807

Please sign in to comment.