xFabel

حد يقولي وش سالفه هنا؟

Recommended Posts

سلام عليكم ورحمة الله وبركاته

اليوم بصمم سكربت الي يرسل شات لديسكورد بس طلع لي مشكله المشكله انه اذا انك انت كتبت شي ب حرف جي مايطلع كلام ب ديسكورد قد ماحولت تجيني مشكله

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)

لاتبخلون حل بالله

Share this post


Link to post
8 minutes ago, Bassam*Syria said:

اعرض لنا الفانكشن الي تتصل عليه

discordالي ب مود

اسم الفنكشن :send

يوووووووووووووه يقدمك

منور المنتدى

  • Confused 1

Share this post


Link to post
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

 

Share this post


Link to post
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 by xFabel

Share this post


Link to post

جرب كذا 

 

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)

 

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.