Coder Social home page Coder Social logo

vrp_discord's Introduction

Discord Rich Presence for VRP 2

[PT-BR]

Permite que um jogador no seu servidor exiba o nome de seu personagem, a profissão, e outras mensagens personalizadas como atividade no Discord.

[EN]

Allows a player on your server to show his character name, job and other custom messages as a Discord Activity.

Image of the Rich Presence

[PT-BR]

Instalação

Para instalar via Git:

cd resources
git clone [email protected]:mad-city/vrp_discord.git

Para instalar manualmente:

Efetue o download no topo da pagina e coloque dentro da sua pasta resources.

Não esqueça de adicionar start vrp_discord no seu server.cfg

Configurando

O primeiro passo é acessar o Discord e criar uma nova aplicação.

O nome da aplicação será exibido na atividade do Discord (primeira linha), após isso você poderá alterar as configurações no arquivo cfg/discord.lua, informando o ID do seu aplicativo recem criado no campo cfg.DiscordAppId, a quantidade de players que o seu servidor suporta, e também o tempo de atualização.

As demais configurações dependem dos assets que você deve enviar, siga o exemplo abaixo:

Image of the asset list

IMPORTANTE

Você DEVE declarar todos os trabalhos neste arquivo de config, ou isso irá gerar um erro no console do seu cliente.

Para declarar um novo trabalho você deve acrescentar uma linha no arquivo cfg/discord.lua seguindo este padrão:

nomedogrupo = {name = "Nome do Grupo", asset = "nomedoasset"}

  • nomedogrupo - Representa o nome do grupo criado no arquivo vrp/cfg/groups.lua
  • name - Representa o nome a ser exibido quando o usuário pausar o mouse sobre a imagem (SmallAsset)
  • asset - Nome do asset enviado para seu aplicativo do Discord, utilizamos o campo asset para que você possa utilizar o mesmo arquivo para multiplas profissões, ex: Soldado, Policial, Detetive, Capitão da Policia, etc.

[EN]

Instalation

To install from Git:

cd resources
git clone [email protected]:mad-city/vrp_discord.git

To install manually:

Download the repository from the top of this page and put into your resource folder.

Don't forget to add start vrp_discord on your server.cfg

Configuration

The first step is access the Discord website and create a new application.

The name of the application will be shown as Discord activity (first line), after that you will be able to update the cfg/discord.lua giving your recently created application on the cfg.DiscordAppId field, the quantity of slots that your server have, and also the update cycle of the presence.

The other settings depends on the assets you should send, follow the example below:

Image of the asset list

IMPORTANT

You MUST declare every job on this config file or it will trig an error on the client console.

To set a new job you have to add a new line on your cfg/discord.lua following this pattern:

groupname = {name = "Name of the Group", asset = "assetname"}

  • groupname - Represents the name of the group you have in vrp/cfg/groups.lua
  • name - Represents the name to be displayed when the user pauses the mouse over the image (SmallAsset)
  • asset - Name of the asset sent to your Discord application, we use the asset field so you can use the same file for multiple jobs/groups, eg: Soldier, Police Officer, Detective, Police Captain, etc.

vrp_discord's People

Contributors

pz1k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.