--pavetr.top/ds if not MENU_DLL then return end pcall(require,"gdiscord") local discord_start = os.time() if DiscordRPCInitialize then DiscordRPCInitialize("887271188773076992") end if exec_cfg_GetValue("DISCORD_ENABLE")==nil then exec_cfg_SetValue("DISCORD_ENABLE",true) exec_cfg_SetValue("DISCORD_SHOWSERVER",true) end local function DiscordUpdate() if not exec_cfg_GetValue("DISCORD_ENABLE")then return end local rpc_data = {} if exec_cfg_GetValue("DISCORD_SHOWSERVER")then if IsInGame()and file.Exists("ihs.txt","DATA")then local inf = util.JSONToTable(file.Read("ihs.txt","DATA")) rpc_data["state"] = inf.host rpc_data["partySize"] = inf.online rpc_data["partyMax"] = inf.max else rpc_data["state"] = "Main Menu" end else rpc_data["state"] = "with best cheat of gmod" end rpc_data["largeImageText"] = "https://exec.pavetr.top/" rpc_data["largeImageKey"] = "default" rpc_data["details"] = "Playing in Garry's Mod" rpc_data["startTimestamp"] = discord_start if DiscordUpdateRPC then DiscordUpdateRPC(rpc_data) end end DiscordUpdate() timer.Create("DiscordRPCTimer",5,0,DiscordUpdate) local discordupdateserver = [[file.Write("ihs.txt",util.TableToJSON({host=GetHostName(),online=#player.GetAll(),max=game.MaxPlayers()}))]] exec_addclientcodetoautorun("Discord",discordupdateserver) if IsInGame()then exec_runtoclientside(discordupdateserver) end exec_menuaddtab("Discord",function() pcall(require,"gdiscord") DiscordUpdate() timer.Create("DiscordRPCTimer",5,0,DiscordUpdate) exec_menuaddcheckbox("Enabled",15,15,"DISCORD_ENABLE") exec_menuaddcheckbox("Show Server",15,45,"DISCORD_SHOWSERVER") if not file.Exists("lua/bin/gmsv_gdiscord_win64.dll","GAME")and not file.Exists("lua/bin/gmsv_gdiscord_win32.dll","GAME")then exec_menuaddlabel("1.Need download dll",15,70,15,500,25) exec_menuaddlabel("2.Drop to steam/steamapps/common/GarrysMod/garrysmod/lua/bin/",15,85,15,500,25) exec_menuaddlabel("3.Replace 'cl' to 'sv' in name dll file",15,100,15,500,25) exec_menuaddbutton("download for standart",15,125,function() exec_notification("link copied") SetClipboardText("https://github.com/fluffy-servers/gmod-discord-rpc/releases/download/1.1/gmcl_gdiscord_win32.dll") end,200) exec_menuaddbutton("download for x64 chromium",15,125+35,function() exec_notification("link copied") SetClipboardText("https://github.com/fluffy-servers/gmod-discord-rpc/releases/download/1.1/gmcl_gdiscord_win64.dll") end,200) end end)