Outlaw Posted August 1, 2019 Share Posted August 1, 2019 addEvent("triggersuppmemo",true) function sendChatMessage(plyr) local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second -- Make sure to add a 0 to the front of single digits. if (hours < 10) then hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if (seconds < 10) then seconds = "0"..seconds end if supp_chat and isElement(supp_chat) then local newText = guiGetText(support_urmsg) triggerServerEvent("mutedplyer", localPlayer) if mutedplyer then return end if newText and string.len(newText) >= 4 then triggerServerEvent("triggersuppmemo", localPlayer, supp_chat) local oldText = guiGetText(supp_chat) if not oldText then oldText = "" end oldText = ( ( oldText ) .. "[" .. ( tostring ( hours ) ) .. ":" .. ( tostring ( minutes ) ) .. ":" .. ( tostring ( seconds ) ) .. "]" .. ( getPlayerName ( localPlayer ) ) .. ": " .. ( newText ) ) guiSetText(supp_chat, oldText) guiSetText(support_urmsg, "") guiMemoSetCaretIndex(supp_chat, string.len(oldText)) end end end addEventHandler("onClientGUIAccepted", resourceRoot, sendChatMessage) addEventHandler("triggersuppmemo", root, sendChatMessage) function triggerit (supp_chat) for i,v in ipairs(getElementsByType("player")) do triggerClientEvent(v, "triggersuppmemo", v, supp_chat, source) end end addEvent("triggersuppmemo", true) addEventHandler("triggersuppmemo", root,triggerit) بدي الرسائل تطلع لكل اللاعبين debug: Error : Server triggered clientsite event aSuport Text , but event is not added clientside Link to comment
HassoN Posted August 1, 2019 Share Posted August 1, 2019 ؟؟ aSuport ما اشوف الايفنت الي اسمه Link to comment
Outlaw Posted August 1, 2019 Author Share Posted August 1, 2019 5 minutes ago, HassoN said: ؟؟ aSuport ما اشوف الايفنت الي اسمه أسف وضعت الديبق الخطأ هذا الي جاني: client.Lua:203: clientside element 'gui-memo' at argument 3@ 'triggerServerEvent' Link to comment
nxFairlywell Posted August 1, 2019 Share Posted August 1, 2019 انت حاط عنصر من اللوحه في الترايقر وهذا ماينفع تختلف من شخص لشخص GUI لأن حاط الميمو في الترايقر , وعناصر ليه حاط الميمو في الترايقر ؟ Link to comment
Outlaw Posted August 2, 2019 Author Share Posted August 2, 2019 1 hour ago, NX_CI said: انت حاط عنصر من اللوحه في الترايقر وهذا ماينفع تختلف من شخص لشخص GUI لأن حاط الميمو في الترايقر , وعناصر ليه حاط الميمو في الترايقر ؟ سويتله ترايقر لسيرفر عشان يطلع لكل الناس و بعدين رجعته للكينت أنا مازلت مبتدأ ممكن تصليح للكود؟ Link to comment
nxFairlywell Posted August 2, 2019 Share Posted August 2, 2019 انت لما تسوي ترايقر لسيرفر تحتاج فقط الكلام اللي تبغى ترسله لكل اللاعبين وبعدين تسوي ترايقر من كلينت لسيرفر والترايقر ذا مهمته يشغل داله في الكلينت لكل اللاعبين اللي في الترايقر فالميمو هنا تكون بنفس المتغير اللي في الكلينت يوم تنفذ الترايقر في الكلينت لكل اللاعبين يعني مايحتاج تحط الميمو على طول حط المتغير حقها يوم تسوي ارسال اتمنى فهمت Link to comment
Outlaw Posted August 2, 2019 Author Share Posted August 2, 2019 14 minutes ago, NX_CI said: اتمنى فهمت مشكور بس مافي شي يضحك Link to comment
nxFairlywell Posted August 2, 2019 Share Posted August 2, 2019 5 hours ago, Outlaw said: مشكور بس مافي شي يضحك لا محشوم انت ما اضحك عليك فقط اضحك على شرحي =D 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