Página 2 de 2

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 09 Set 2019, 09:11
por Edouard Mass
Lockou escreveu:
11 Ago 2019, 00:44
Não está funcionando para mim, não sei o porque
Acredito que seja porque o Discord reconhece o jogo nativamente agora.

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 08 Out 2019, 09:05
por dmitriyewich
A little tweaked for myself. Since I play with the Russian translation, the areas were displayed in hieroglyphs, so I found a list of areas and inserted into the code, now everything is more adequate.
In the Russian version: The name of the districts in Russian and the square where the character is located (used for a map with squares)
In the English version: Only the names of the districts in English.
Link
 

Added after 3 minutes 30 seconds:
Russian versionAbrir
ImagemImagem
 

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 08 Out 2019, 18:02
por GTA_GamerZ
I have downloaded mod, how can I see if it works?

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 09 Out 2019, 04:45
por Junior_Djjr
GTA_GamerZ escreveu:
08 Out 2019, 18:02
I have downloaded mod, how can I see if it works?
Looking at Discord...

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 09 Out 2019, 11:17
por GTA_GamerZ
Junior_Djjr escreveu:
09 Out 2019, 04:45
GTA_GamerZ escreveu:
08 Out 2019, 18:02
I have downloaded mod, how can I see if it works?
Looking at Discord... 
Ok I'll search in it because I don't know where to look in Discord

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 03 Nov 2019, 21:44
por Perk
Israel, seria possível você traduzir o mod para o Português-BR? E também adaptar os nomes dos locais para o inglês pois o Ç e os acentos bugam no Discord.

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 12 Mai 2020, 17:02
por dmitriyewich
Redid again for themselves.
Only for samp.
Did the mapping nick, id. Also, money separated by dots.
I was bored.
There are no squares in the English version.
In the future I will try to replace the picture. Or make it customizable.
For some reason I didn’t sign up, when you hover over any line, it opens completely, as in the original version
ImagemImagem



Link

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 27 Mar 2021, 11:24
por CanerKaraca
dmitriyewich escreveu:
12 Mai 2020, 17:02
Redid again for themselves.
Only for samp.
Did the mapping nick, id. Also, money separated by dots.
I was bored.
There are no squares in the English version.
In the future I will try to replace the picture. Or make it customizable.
For some reason I didn’t sign up, when you hover over any line, it opens completely, as in the original version
ImagemImagemLink
It's not working for me.

Re: [Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 27 Mar 2021, 11:46
por dmitriyewich
CanerKaraca escreveu:
27 Mar 2021, 11:24
It's not working for me.
moonloader.log attach to post

upd: Download again and check

Re: [Cleo|Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 26 Abr 2021, 15:57
por Israel
Atualizado (26/04/2021)
  • Mod refeito em Cleo (Pode conter bugs. Avise.)

Fiz uma versão em Cleo, mas não tive boas possibilidades de testes (principalmente no SA-MP).
Mantive as duas versões no tópico.

Re: [Cleo|Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 01 Mai 2021, 05:47
por Junior_Djjr
No SAMP só mostra "Jogando a X minutos", nada mais.
Testado na 0.3.7-R4, aproveitando, tenha certeza de que funciona na 0.3.DL também, são as duas principais (mas a DL é baseada na .7-R4 então acho que é de boa).

Você usa o SAMPFuncs só pra pegar o IP?

Peguei por aí... Isto pega o IP do atual servidor do SAMP. Tem o port também.

Código: Selecionar tudo

std::fstream lg;

struct IPv4
{
    uint8_t ip[4];
    uint16_t port;

    friend bool operator == (const IPv4& left, const IPv4& right)
    {
        return std::make_tuple(left.ip[0], left.ip[1], left.ip[2], left.ip[3]) == std::make_tuple(right.ip[0], right.ip[1], right.ip[2], right.ip[3]) &&
            (left.port == right.port || left.port == 0 || right.port == 0);
    }
};

bool IsOkIP()
{
    IPv4 myIP = {};

    int numArgs = 0;
    LPWSTR* cmdLine = CommandLineToArgvW(GetCommandLineW(), &numArgs);
    if (cmdLine != nullptr)
    {
        for (auto it = cmdLine + 1, end = cmdLine + numArgs; it != end; ++it)
        {
            if (_wcsicmp(*it, L"-h") == 0)
            {
                auto ipIt = std::next(it);
                if (ipIt != end)
                {
                    swscanf_s(*ipIt, L"%" SCNu8 ".%" SCNu8 ".%" SCNu8 ".%" SCNu8, &myIP.ip[0], &myIP.ip[1], &myIP.ip[2], &myIP.ip[3]);
                    lg << "ip " << (int)myIP.ip[0] << "." << (int)myIP.ip[1] << "." << (int)myIP.ip[2] << std::endl;
                    it = ipIt;
                }
                continue;
            }

            /*if (_wcsicmp(*it, L"-p") == 0)
            {
                auto portIt = std::next(it);
                if (portIt != end)
                {
                    //swscanf_s(*portIt, L"%" SCNu16, &myIP.port);
                    lg << "port " << portIt << std::endl;
                    it = portIt;
                }
                continue;
            }*/
        }

        LocalFree(cmdLine);
    }

    return false;
}

Re: [Cleo|Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 04 Mai 2021, 19:13
por Israel
Junior_Djjr escreveu:
01 Mai 2021, 05:47
No SAMP só mostra "Jogando a X minutos", nada mais.
Acho que agora tá de boa.
Junior_Djjr escreveu:
01 Mai 2021, 05:47
Você usa o SAMPFuncs só pra pegar o IP?
Não, gamestate e server_name também.

Re: [Cleo|Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 16 Jun 2021, 10:49
por Israel
Atualizado (07/02/2019)
  • Corrigido crash ao dirigir veículos com nome longo
  • Corrigido Camera e Night Vision com nomes alternados

Re: [Cleo|Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 17 Jun 2021, 15:04
por Artprozew
Eu também tinha feito algumas mudanças nesse mod um tempo atrás para mim mesmo. Fiz mais algumas mudanças e decidi compartilhar aqui.
Notas: Baseado apenas na versão em Lua. A versão em inglês também inclui as mudanças, exceto a primeira
O que foi mudado:
  • Traduzido para português e corrigido (alguns (principais)) acentos
  • Irá aparecer a imagem e nome da região atual (Somente as principais regiões)
  • Adaptação para SAxVCxLC:
    Irá aparecer a imagem de Vice City e Liberty City (Atualmente só funciona para a versão Connected), como também ícones e nomes das armas.
  • Nomes de veículos adicionados sem substituir também irão aparecer normalmente
  • Outras pequenas mudanças como dinheiro separado por vírgula, aparecer pilotando um avião ou pilotando uma moto ao invés de dirigindo, aparecer a velocidade do veículo (opcional)...
Obs.: se alguém tiver imagens melhores das regiões e quiser mandar, eu posso as trocar.
Eu também gostaria de adicionar a informação de se o jogo está pausado ou não e se o jogador está em uma missão ou não (e talvez até o nome da missão). Mas não consegui fazer e não sei se é possível.

Abra o arquivo .lua com o bloco de notas se quiser configurar e ativar a adaptação para SAxVCxLC.
 
Demonstração:
Imagem

Download (English & Português):
Discord Rich Presence (Lua) (Edit).7z
(144.61 KiB) Baixado 168 vezes

Re: [Cleo|Lua] Mostrar dados do GTA no discord (Rich Presence)

Enviado: 25 Jun 2023, 14:59
por CanerKaraca
dmitriyewich escreveu:
12 Mai 2020, 17:02
Redid again for themselves.
Only for samp.
Did the mapping nick, id. Also, money separated by dots.
I was bored.
There are no squares in the English version.
In the future I will try to replace the picture. Or make it customizable.
For some reason I didn’t sign up, when you hover over any line, it opens completely, as in the original version
ImagemImagemLink
Link is broken, can you update?