Jump to content

Sr.Edu

Members
  • Posts

    8
  • Joined

  • Last visited

Details

  • Gang
    IZ
  • Location
    Brasil
  • Occupation
    Sub Dono/Administrador
  • Interests
    Mundo da Tecnologia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Sr.Edu's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Boa tarde, desde a semana passada, estou tendo um probleminha com o FPS do MTA, na tela inicial eu tenho um lag absurdo (uns 23 fps que eu fico) e eu não sei o motivo. No meu local com o limite de 58 fps que sempre teve, eu ficava com 56 e 55 fps, mas agr tou com 23 e 32 fps.
  2. Existe alguma maneira de pegar as alterações na ACL ? Tipo , criações de group , alterações em um group e etc.
  3. someone help me to create an http function to show teamsay chat and global
  4. OBS: Não precisa mais , conseguir fazer a solicitação de webhook de outra maneira
  5. Eu tenho uma dúvida , eu peguei um script na internet de WebHook Discord para enviar mensagens para o Discord. Eu queria saber como posso usar as function do script de Webhook em um script server-side do MTA. Obs = Eu pesquisei e parece que a váriavel require está desativa no mta. Pois se não tivesse desativada eu acho que era somente usar "local DiscordHook = require "DiscordHook"" , que exportava as functions Script Discord Webhook. --[[ DiscordHook by HydroNitrogen Licenced under MIT Copyright (c) 2019 Wendelstein7 (a.k.a. HydroNitrogen) See: https://github.com/Wendelstein7/DiscordHook-CC ]]-- local DiscordHook = { ["name"] = "DiscordHook", ["author"] = "HydroNitrogen", ["date"] = "2019-01-30", ["version"] = 1, ["url"] = "https://github.com/Wendelstein7/DiscordHook-CC" } local function expect(func, arg, n, expected) if type(arg) ~= expected then return error(("%s: bad argument #%d (expected %s, got %s)"):format(func, n, expected, type(arg)), 2) end end local function send(url, data, headers) local request, message = http.post(url, data, headers) if not request then return false end return true end function DiscordHook.createWebhook(url) expect("createWebhook", url, 1, "string") local success, message = http.checkURL(url) if not success then return false, "createWebhook: Can't access invalid url - " .. message else local _ = {} _.url = url _.sentMessages = 0 function _.send(message, username, avatar) expect("send", message, 1, "string") local data = "content=" .. textutils.urlEncode(message) if username then expect("send", username, 2, "string") data = data .. "&username=" .. textutils.urlEncode(username) end if avatar then expect("send", avatar, 3, "string") data = data .. "&avatar_url=" .. textutils.urlEncode(avatar) end local success = send(_.url, data, { ["Content-Type"] = "application/x-www-form-urlencoded", ["Source"] = "Minecraft/ComputerCraft/DiscordHook" }) if success then _.sentMessages = _.sentMessages + 1 end return success end function _.sendJSON(json) expect("sendJSON", json, 1, "string") local success = send(_.url, json, { ["Content-Type"] = "application/json", ["Source"] = "Minecraft/ComputerCraft/DiscordHook" }) if success then _.sentMessages = _.sentMessages + 1 end return success end function _.sendEmbed(message, title, description, link, colour, image_large, image_thumb, username, avatar) expect("sendEmbed", message, 1, "string") local data = { ["content"] = message, ["embeds"] = { {} } } if title then expect("sendEmbed", title, 2, "string") data["embeds"][1]["title"] = title end if description then expect("sendEmbed", description, 3, "string") data["embeds"][1]["description"] = description end if link then expect("sendEmbed", link, 4, "string") data["embeds"][1]["url"] = link end if colour then expect("sendEmbed", colour, 5, "number") data["embeds"][1]["color"] = colour end if image_large then expect("sendEmbed", image_large, 6, "string") data["embeds"][1]["image"] = { ["url"] = image_large } end if image_thumb then expect("sendEmbed", image_thumb, 7, "string") data["embeds"][1]["thumbnail"] = { ["url"] = image_thumb } end if username then expect("sendEmbed", username, 8, "string") data["username"] = username end if avatar then expect("sendEmbed", avatar, 9, "string") data["avatar_url"] = avatar end local success = send(_.url, textutils.serializeJSON(data), { ["Content-Type"] = "application/json", ["Source"] = "Minecraft/ComputerCraft/DiscordHook" }) if success then _.sentMessages = _.sentMessages + 1 end return success end return true, _ end end return DiscordHook
  6. Não , ele não aparece nenhum erro. No Task Manager , o processo "gta_sa.exe" inicia , só que depois de um tempo , ele finaliza.
  7. Opa bom dia , ontem formatei meu pc , então hoje fui instalar o gta san andreas e o mta san. Só que o MTA San Andreas não quer abrir. OBS: O Gta San abre normalmente. MTADiag Log: https://pastebin.mtasa.com/621776023
×
×
  • Create New...