Outlaw Posted July 31, 2019 Share Posted July 31, 2019 السلام عليكم جربت كتييييير و ما لقيت حل function sendChatMessage() if supp_chat and isElement(supp_chat) then local newText = guiGetText(support_urmsg) if newText and string.len(newText) > 0 then local oldText = guiGetText(supp_chat) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(g_LocalPlayer) .. ": " .. newText .. "\n" guiSetText(supp_chat, oldText) guiSetText(support_urmsg, "") guiMemoSetCaretIndex(supp_chat, string.len(oldText)) end end end addEventHandler("onClientGUIAccepted", g_ResourceRoot, sendChatMessage) أشتغل على مود مساعدة لما اظغط على Enter الرسالة ما تطلع ليش؟ Link to comment
SycroX Posted July 31, 2019 Share Posted July 31, 2019 (edited) استخدم حدث onClientKey or bindKey Edited July 31, 2019 by #x1AhMeD-09 Link to comment
Outlaw Posted July 31, 2019 Author Share Posted July 31, 2019 (edited) تم حل المشكلة ^^ Edited July 31, 2019 by Outlaw Link to comment
Outlaw Posted July 31, 2019 Author Share Posted July 31, 2019 ممكن تصحيح لهذا الكود؟ بدي اضيف الوقت قبل الإسم oldText = oldText "..[""..hours.."-"..minute..""..second.." .." "" .. getPlayerName(localPlayer) .. ": " .. newText .. ""\n" debug: unexpected symbol near ""..second.."" Link to comment
MrBiG Posted July 31, 2019 Share Posted July 31, 2019 2 hours ago, Outlaw said: debug: unexpected symbol near ""..second.."" oldText = ( ( oldText ) .. "[" .. ( tostring ( hours ) ) .. "-" .. ( tostring ( minute ) ) .. "-" .. ( tostring ( second ) ) .. "]" .. ( getPlayerName ( localPlayer ) ) .. ": " .. ( newText ) ) 1 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