Jump to content

مساعدة بليز


Recommended Posts

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
5 minutes ago, HassoN said:

؟؟ aSuport  ما اشوف الايفنت الي اسمه 

أسف وضعت الديبق الخطأ

هذا الي جاني:

client.Lua:203: clientside element 'gui-memo' at argument 3@ 'triggerServerEvent'

Link to comment
1 hour ago, NX_CI said:

انت حاط عنصر من اللوحه في الترايقر وهذا ماينفع

تختلف من شخص لشخص GUI لأن حاط الميمو في الترايقر  , وعناصر

ليه حاط الميمو في الترايقر ؟

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

أنا مازلت مبتدأ ممكن تصليح للكود؟

Link to comment

انت لما تسوي ترايقر لسيرفر تحتاج فقط الكلام اللي تبغى ترسله لكل اللاعبين

وبعدين تسوي ترايقر من كلينت لسيرفر والترايقر ذا مهمته يشغل داله في الكلينت لكل اللاعبين اللي في الترايقر

فالميمو هنا تكون بنفس المتغير اللي في الكلينت يوم تنفذ الترايقر في الكلينت لكل اللاعبين

يعني مايحتاج تحط الميمو على طول حط المتغير حقها يوم تسوي ارسال

اتمنى فهمت :|:lol:

Link to comment

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.
×
×
  • Create New...