بدل ما انزل كمان موضوع
كيف اخلي الكلام يجي بنص
انا سويتة يجي بس بجي كلو على الاتجاة نفسة
زي هيك
http://im64.gulfup.com/C4y3Nt.png
انا بدي
زي
topbarchat
يجي الكلام من النص و يروح على الاتجاهين
addEventHandler("onClientPreRender",root,
function()
dxDrawRectangle(screenX/4+(screenX/16),1*20-20,screenX/2-(screenX/16),20.0,tocolor(0,0,0,150),false)
local x, y, z = getElementPosition(localPlayer)
dxDrawText(" Local Player Name: #ff6400"..getPlayerName(localPlayer).."#ffffff | Zone: #ffff00"..getZoneName(x, y, z, false).."#ffffff (#ffff00"..getZoneName(x, y, z, true).."#ffffff)",screenX/4+(screenX/16),1*40-40,screenX/2-(screenX/16),20.0,tocolor(255, 255, 255, 255),1.0,"default-bold","left","center",false,false,false, true)
if #topChat >= 8 then table.remove(topChat, 1) end
for k, v in ipairs(topChat) do
dxDrawRectangle(screenX/4+(screenX/16),k*20,screenX/2-(screenX/16),20.0,tocolor(0,0,0,150),false)
dxDrawText(" "..v[1],screenX/4+(screenX/5),k*40,screenX/2-(screenX/16),20.0,tocolor(v[2],v[3],v[4],255),1.0,"default-bold","left","center",false,false,false, true)
end
end
)
function outputTopChat(message, r, g, b)
table.insert(topChat, { message, r, g, b })
local thetime = getRealTime()
outputConsole("["..string.format("%.2d:%.2d:%.2d", thetime.hour, thetime.minute, thetime.second).."] "..message:gsub("#%x%x%x%x%x%x", ""))
setTimer(function() table.remove(topChat, 1) end, 60000, 1)
end
addEvent("outputTopChat", true)
addEventHandler("outputTopChat", root, outputTopChat)