- Joined
- Jul 25, 2013
- Messages
- 18
- Reaction score
- 9
Well, 'm bored, and idk when I will open a new server, so.., I decided to release this code and files(that you can download searching google by yourself or download on my video), this is really easy to implementate, first, I need tell you that i wont support anyone, maybe you can do more efficient my code. PD: suscribe my youtube channel for more releases.Well, Imma let the steps by numbers.
1- we need a Discord Application, so, you should watch a tutorial of how to create one or watch my video, i gift it to you below.
2- Copy all files and directories in files archive that you should download(link on video) and paste in your Gunz source directory.
3- Open your Gunz source, and right clic in to:
PHP:
Gunz->Settings->VC++ directories->Files directories includes
add
PHP:
Gunz/Discord/include
PHP:
Gunz/Discord/src

4- Now you should create filters on your source, go to:
PHP:
Gunz->Add->New Filter->Discord
4.1- Now new sub filters:
PHP:
Discord->Add->New Filter->DiscordClass
PHP:
Discord->Add->New Filter->DiscordSDK
5- We should add Existents Elements to these filters:
PHP:
DiscordClass->Add Existents Elements->Discord.h and Discord.cpp
PHP:
DiscordSDK->Add Existents Elements->backoff.h/connection_win.cpp/discord_register_win.cpp/discord_rpc.cpp/dllmain.cpp/msg_queue.h/rpc_connection.cpp/rpc_connection.h/serialization.cpp/serialization.h
6- Now we should compilate with no errors, and open main.cpp and add on top:
PHP:
#include "Discord.h"
Discord* g_Discord;
PHP:
mlog("InitialLoading
and add below
PHP:
g_Discord->Initialize();
g_Discord->Update();
mlog("Discord Initialized");
Well, this is all for add Discord to the source, now you need to edite the code for your discord app.
8- open Discord.cpp and you will see something like this
PHP:
void Discord::Initialize(){
DiscordEventHandlers Handle;
memset(&Handle, 0, sizeof(Handle));
Discord_Initialize("ID", &Handle, 1, NULL); //api key
}
void Discord::Update() {
DiscordRichPresence discordPresence;
memset(&discordPresence, 0, sizeof(discordPresence));
discordPresence.state = "Playing Solo";
discordPresence.details = "xTremeGunz is FUN!";
discordPresence.largeImageKey = "xtremegunz";
discordPresence.largeImageText = "Playing XTREMEGUNZ";
discordPresence.smallImageKey = "23130950_1446117188819976_4953181561936402594_n1";
discordPresence.smallImageText = "Server 1 - All Players";
discordPresence.partyId = "PARTY ID";
discordPresence.partySize = 1; discordPresence.partyMax = 0;
discordPresence.joinSecret = "JOIN SECRET";
Discord_UpdatePresence(&discordPresence);
}

and you will replace ID, PARTY ID and JOIN SECRET with your discord app info, all the other info you will need yo replace with your app info too.In video i will show you how to make an "dynamic" discord state for gunz, if you want to learn more, there is the video.
MERRY CHRISTMAS FOR ALL YOU
Last edited: