Popular Post MrZsemle Posted December 30, 2018 Popular Post Share Posted December 30, 2018 (edited) Send message to Discord from MTA:SA STEP I. Make a new webhook on your Discord server STEP II. Change the variable to your webhook URL. STEP III. Start the resource, and test it with the /dcmessage <string> command, or use it with another script using the following export: exports.webhook:sendDiscordMessage("string") Download the script here. Edited January 5, 2021 by MrZsemle Formatting 5 2 Link to comment
5150 Posted January 28, 2019 Share Posted January 28, 2019 @MrZsemle how come it only allows one word per message? Link to comment
Mr.Loki Posted January 28, 2019 Share Posted January 28, 2019 You need to change "param" into a table to catch all other subsequent params by using "..." then using table.concat to join them. -- Test the function function test(player, command, ...) local msg = table.concat({...}," ") sendDiscordMessage(msg) end addCommandHandler("dcmessage", test) 3 Link to comment
MrZsemle Posted January 28, 2019 Author Share Posted January 28, 2019 7 hours ago, Mr.Loki said: You need to change "param" into a table to catch all other subsequent params by using "..." then using table.concat to join them. -- Test the function function test(player, command, ...) local msg = table.concat({...}," ") sendDiscordMessage(msg) end addCommandHandler("dcmessage", test) Thanks Loki, i'm update the resource. 1 Link to comment
MrZsemle Posted October 6, 2019 Author Share Posted October 6, 2019 Now available on GitHub 1 Link to comment
OKD Gaming Posted June 4, 2020 Share Posted June 4, 2020 (edited) am i doing something wrong? Edited June 4, 2020 by OKD Gaming Link to comment
MrZsemle Posted August 7, 2020 Author Share Posted August 7, 2020 (edited) On 04/06/2020 at 08:44, OKD Gaming said: am i doing something wrong? What MTA Server version do you using? In the future - if someone needs help, or found a bug, wants to give an advice - please consider using my GitHub Issues, or DM me. Edited August 7, 2020 by MrZsemle Link to comment
yZion Posted August 27, 2020 Share Posted August 27, 2020 Hello MrZsemle I was wondering if there is any way to create messages in a way that the discord will not embed because I tried to do it here and it didn't work. Link to comment
MedAliTounsi Posted September 21, 2020 Share Posted September 21, 2020 how to get mta logs in discord please Link to comment
Mr.Loki Posted September 23, 2020 Share Posted September 23, 2020 On 21/09/2020 at 12:55, MedAliTounsi said: how to get mta logs in discord please onDebugMessage but this is a bad idea if you have lots of errors/warnings Link to comment
NetroX Posted August 11, 2023 Share Posted August 11, 2023 I only get an emtpy responseData message. Can someone helo? https://imgur.com/a/Kk70PUI Link to comment
Recommended Posts