0 Üye ve 1 Ziyaretçi konuyu incelemekte.
function chatbox( text, type) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFFFFF #000000▄▀▄▀▄ #990000Kurucu#000000 ▄▀▄▀▄#99FFFF " .. getPlayerName ( source ) .. ":#0099FF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [kurucu] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFFFFF #000000˙·٠•● #FF0000Admin#000000 ●•٠·˙#99FFFF " .. getPlayerName ( source ) .. ":#FFFF00 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Admin] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFFFFF #000000˙·٠•●●•٠·#00FF00Smod#000000·٠•●●•٠·˙#99FFFF " .. getPlayerName ( source ) ..":#00FF33 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Smod] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFFFFF #000000 <<<< #0033FFMod#000000 >>>> #66CC66 " .. getPlayerName ( source ) ..":#9999CC " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Mod] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox("#FFFFFF *** #666699Uye#FFFFFF *** #66CC66 " .. getPlayerName ( source ) ..":#FF6633 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Uye] " .. getPlayerName ( source ) .. ": " .. text) elseif type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( " " .. getPlayerName ( source ) .. ":#FF6633 " .. text, getRootElement(), r, g, b, true ) outputServerLog( "CHAT: " .. getPlayerName ( source ) .. ": " .. text ) endendaddEventHandler("onPlayerChat", getRootElement(), chatbox)function s3d() outputChatBox ( "", source, 0, 0, 0, true )endaddEventHandler("onPlayerJoin", getRootElement(), s3d)
reklamTablo = { -- reklam kelimeleri(küfürleri de buraya girebilirsin)'22003', '22004', 'mtasa', 'gaming', 'freeroam', 'gamıng', 'GAMİNG', 'free', '[F]REE[R]OAM', 'ɢαмιɴɢ', 'Fʀᴇᴇʀᴏᴀᴍ','Fяєєяσαм',}yazilar = { -- yukardaki reklam kelimlerinden yazınca çıkcak yazı "Ateş Gaming En Güzel Server Artık Hep Burda Oynucam :DD", "Waow Server Çok Efsane Ellerine Sağlık Kurucu.", "Beyler Server Çok İyi Ya Bu Server Varken Hayatta Başka Servera Gitmem." }mesajTablo = { -- kısaltmalar [{"sa", "sea", "s.a"}] = "Selamun Aleyküm", [{"as", "ase", "a.s"}] = "Aleyküm Selam", [{"hg", "h.g"}] = "Hoşgeldin", [{"hb", "h.b"}] = "Hoşbuldum",}function isAdvertisement(str) assert(type(str) == "string", "Bad argument 1 @ isAdvertisement [String expected, got " .. type(str) .. "]") local str = string.gsub(str, '#%x%x%x%x%x%x', '') local workingWord = string.lower(str):gsub("[_-;:µ|><!^#'%%!§$\\&/()=._-,-#+}{ ]", '').."-"; for index, sBadWord in pairs(reklamTablo) do local pattern = workingWord:match(".*"..string.lower(sBadWord).."*."); if(pattern) then return sBadWord end end if str:find("(%d+)%.(%d+)%.(%d+)%.(%d+)") then return true end return falseendfunction chatbox( text, tip) local r, g, b = getPlayerNametagColor(source) local randomID = math.random ( 1, #yazilar ) local yazi = yazilar[randomID] if isAdvertisement(text) then if text ~= yazi then text = yazi end end for i,v in pairs ( mesajTablo ) do for k,t in pairs(i) do if text:lower() == t then text = v end end end if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then cancelEvent() outputChatBox("#FFFFFF #000000▄▀▄▀▄ #990000Kurucu#000000 ▄▀▄▀▄#99FFFF " .. getPlayerName ( source ) .. ":#0099FF " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [kurucu] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then cancelEvent() outputChatBox("#FFFFFF #000000˙·٠•● #FF0000Admin#000000 ●•٠·˙#99FFFF " .. getPlayerName ( source ) .. ":#FFFF00 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Admin] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then cancelEvent() outputChatBox("#FFFFFF #000000˙·٠•●●•٠·#00FF00Smod#000000·٠•●●•٠·˙#99FFFF " .. getPlayerName ( source ) ..":#00FF33 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Smod] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then cancelEvent() outputChatBox("#FFFFFF #000000 <<<< #0033FFMod#000000 >>>> #66CC66 " .. getPlayerName ( source ) ..":#9999CC " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Mod] " .. getPlayerName ( source ) .. ": " .. text) elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then cancelEvent() outputChatBox("#FFFFFF *** #666699Uye#FFFFFF *** #66CC66 " .. getPlayerName ( source ) ..":#FF6633 " .. text, getRootElement(), r, g, b, true ) outputServerLog("CHAT: [Uye] " .. getPlayerName ( source ) .. ": " .. text) elseif tip == 0 then cancelEvent ( ) outputChatBox ( " " .. getPlayerName ( source ) .. ":#FF6633 " .. text, getRootElement(), r, g, b, true ) outputServerLog( "CHAT: " .. getPlayerName ( source ) .. ": " .. text ) endendaddEventHandler("onPlayerChat", getRootElement(), chatbox)