iiv03 Posted September 7, 2019 Share Posted September 7, 2019 سلام عليكم ورحمة الله وبركاته اليوم بصمم سكربت الي يرسل شات لديسكورد بس طلع لي مشكله المشكله انه اذا انك انت كتبت شي ب حرف جي مايطلع كلام ب ديسكورد قد ماحولت تجيني مشكله addEventHandler("onResourceStart", root, function (message, messageType) for i, player in pairs(getElementsByType("player")) do bindKey(player, "G", "down", "chatbox", "global") if messageType == 0 then exports.discord:send("chat.message.text", { author = getPlayerName(source), text = message }) end end end) function doGlobalChat( player, command, ...) triggerEvent("onPlayerChat", player, table.concat({...}, " "), 3) end addCommandHandler("global", doGlobalChat) كذا يشتغل بس علي حرف T addEventHandler("onPlayerChat", root, function (message, messageType) for i, player in pairs(getElementsByType("player")) do bindKey(player, "G", "down", "chatbox", "global") if messageType == 0 then exports.discord:send("chat.message.text", { author = getPlayerName(source), text = message }) end end end) لاتبخلون حل بالله Link to comment
iiv03 Posted September 7, 2019 Author Share Posted September 7, 2019 سؤال صعب عليكم ؟ Link to comment
Bassam*Syria Posted September 7, 2019 Share Posted September 7, 2019 اعرض لنا الفانكشن الي تتصل عليه discordالي ب مود اسم الفنكشن :send Link to comment
Guest Posted September 7, 2019 Share Posted September 7, 2019 8 minutes ago, Bassam*Syria said: اعرض لنا الفانكشن الي تتصل عليه discordالي ب مود اسم الفنكشن :send يوووووووووووووه يقدمك منور المنتدى Link to comment
iiv03 Posted September 7, 2019 Author Share Posted September 7, 2019 46 minutes ago, Bassam*Syria said: اعرض لنا الفانكشن الي تتصل عليه discordالي ب مود اسم الفنكشن :send المود https://github.com/Necktrox/mta-discord-bot/tree/master/mta Link to comment
Bassam*Syria Posted September 7, 2019 Share Posted September 7, 2019 1 hour ago, .TiGGeR said: يوووووووووووووه يقدمك منور المنتدى حبيبي ♥ 37 minutes ago, xFabel said: المود https://github.com/Necktrox/mta-discord-bot/tree/master/mta مافي فانكشن بالمود اسمه Send Link to comment
N3xT Posted September 7, 2019 Share Posted September 7, 2019 4 minutes ago, Bassam*Syria said: حبيبي ♥ مافي فانكشن بالمود اسمه Send function send(packet, payload) assert(type(packet) == "string") assert(type(payload) == "table") socket:write(table.json { type = packet, payload = payload }) end Link to comment
iiv03 Posted September 7, 2019 Author Share Posted September 7, 2019 (edited) 1 hour ago, .TiGGeR said: يوووووووووووووه يقدمك منور المنتدى 16 minutes ago, N3xT said: function send(packet, payload) assert(type(packet) == "string") assert(type(payload) == "table") socket:write(table.json { type = packet, payload = payload }) end سلامات! الحين تتحدثون ب مشكله ثانيه ولا سالفه حقتي؟ Edited September 7, 2019 by xFabel Link to comment
Bassam*Syria Posted September 7, 2019 Share Posted September 7, 2019 جرب كذا addEventHandler("onPlayerChat", root, function (message, messageType) for i, player in pairs(getElementsByType("player")) do bindKey(player, "G", "down", "chatbox", "global") if messageType == 0 then local author = getPlayerName(source) local text = message exports.discord:send("chat.message.text", { author , text }) end end end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now