Jump to content

x[ مساعدة ]x topbar في


Recommended Posts

السلام عليكم

 Top Barمود الـ 
المود يطلع الرسائل باللغة الانجليزية !بدون مشاكل
ولكن الرسائل باللغة العربية ! بها مشاكل
مثل هذة الصورة :- كيف احل هذة مشكلة!!؟


p_468rgv3z1.png


 

Link to comment
25 minutes ago, Abdul KariM said:

المشكلة من الخط

كيف احلها؟؟

------------------------------------------------------------------------------------------------------------------------------------------------

 

 

27 minutes ago, Ismaeel_finer said:

شوف تنسيق UTF-8

ولا مشكلة من خط يلي انت مسويه للغة انجليزيه ممكن هوا سبب

مود الـTop bar
يستخدم UTF-8
و مود الدائرة يستخدم UTF-8

!!!!!!!!

Link to comment
2 minutes ago, Ismaeel_finer said:

غير ملف خط اول وحط ملف تاني بس ايكون نفس اسم ملف اول


TopBar ملف الـ
يوجود بة فقط ملف السيرفر و كلينت و ملف ميتا



--Server 

--[[ Dispaly a DX topbar message ]]--
function dm(text, plr, r,g,b, col, bell)
	if col == nil then col = false end
	if bell then playSoundFrontEnd(plr, 11) end
	if not plr or not isElement(plr) or getElementType(plr) ~= "player" then return end
	triggerClientEvent(plr, "topbar.addText", root, text, r,g,b, col)
end

--Client 

local timer 		= nil
local messages 		=  { }
local last_msg 		= ""
local display_time_ms 	= 12000

--[[ Display a DX topbar message ]]--
function dm(text, r,g,b, col, bell)
	-- Insert message
	local tick = getTickCount()
	if text == last_msg then return end
	if not col then col = false end
	if bell then playSoundFrontEnd(11) end
	table.insert(messages, {text, true, tick + display_time_ms, 170, r,g,b, col })
	outputConsole("[TOPBAR] "..text)
	last_msg = text
	setTimer(function() last_msg = "" end, 10000, 1)

	-- Play a message notification sound
	--playSoundFrontEnd(11)
end
addEvent("topbar.addText", true)
addEventHandler("topbar.addText", root, dm)

--[[ Render all DX messages ]]--
local sx,sy = guiGetScreenSize()
function render_topbar( )
	local tick = getTickCount()

	-- Prevent to many messages to display at the same time
	if #messages > 7 then table.remove(messages, 1) end

	-- Loop through all messages
	for k,data in ipairs(messages) do
		-- Draw the messages
		dxDrawRectangle(sx/2 - 400, (-26)+(k*25), 800, 25, tocolor(0, 0, 0, data[4]))
		dxDrawText(data[1], sx/2, (-25)+(k*46), sx/2, 0, tocolor(data[5], data[6], data[7],
			data[4]+75), 0.55, "bankgothic", "center", "center", false, true, false, data[8])

		-- Remove after fading out
		if tick >= data[3] then
			messages[k][4] = data[4]-2
			if data[4] <= 1 then table.remove(messages, k) end
		end
	end
end
addEventHandler("onClientRender", root, render_topbar)






 

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...