function convertMilliseconds( i )
if ( i ) then
sec = math.fmod( math.floor( i / 1000 ), 60 )
return string.format( '%2d', sec )
end
end
timeR = {}
function clearChat(player)
local accountname = getAccountName(getPlayerAccount(player))
local WaitTimer = convertMilliseconds( getTimerDetails( timeR[root] ) )
if ( hasObjectPermissionTo ( player, "command.mute", true ) ) then
if isTimer( timeR[root] ) then
outputChatBox( "# Wait [ ".. WaitTimer .." ] Seconds", player, 255, 0, 0 )
return end
outputChatBox(" ")
outputChatBox( getPlayerName(player) .. "#fffffff قام بمسح الشات", root, 0, 255, 255, true)
timeR[root] = setTimer( function() end, 5000, 1 )
end
end
addCommandHandler("Clear", clearChat)