Client Side:
--------------------------------------------------------------------------------------
addEventHandler( "onClientKey", getRootElement(), function (button , prees)
if prees then
if button == "m" then ---------------------------------------------- من هون تختار الحرف اللي يمسحلك الشات
triggerServerEvent("onClearChat", localPlayer)
cancelEvent()
end
end
end)
-----------------------------------------------------
Server Side:
?
ranks = {"Console","Admin"} -- الرتب الي يمديها تمسح الشات
---------------------------------------
addEvent("onClearChat",true)
addEventHandler("onClearChat",root,
function()
local accountName = getAccountName ( getPlayerAccount ( source ) )
for k,v in ipairs ( ranks ) do
if isObjectInACLGroup ("user."..accountName, aclGetGroup ( v ) ) then
for i = 0, 40 do
outputChatBox(" ",root,255,255,255)
end
outputChatBox("* Cleared The Chat By [#c10000"..getPlayerName(source).."#ffffff].",root,255,255,255,true)
end
end
end
)