[YARDIM] Admin Tag

0 Üye ve 2 Ziyaretçi konuyu incelemekte.

Çevrimdışı tMAZE

  • Yeni Üye
  • *
    • İleti: 59
: 14 Ocak 2018, 20:42:30
Selam beyler bu kodları admintaga editlermisiniz yapamadımda :)
Tagım: Linki görebilmek için Kayıt olun yada Giriş yapın.

Kodlar:

Spoiler for Hiden:
Kod: lua
for i,v in pairs ( {"sa", "sea", "s.a", "SA"}, "S.A" ) do
    if text:lower() == v  then
         text =  "Selamun Aleyküm"
  end
    end
 
    for i,v in pairs ( {"as", "ase", "a.s", "SA", "A.S"} ) do
     if text:lower() == v  then
         text = "Aleyküm Selam"
  end
    end

    for i,v in pairs ( {"AFK", "afk"} ) do
     if text:lower() == v  then
         text = "Afk'yım"
  end
    end

for i,v in pairs ( {"HG", "hg", "H.G", "h.g"} ) do
     if text:lower() == v  then
         text = "Hoşgeldin"
  end
    end

for i,v in pairs ( {"HB", "hb", "H.B", "h.b"} ) do
     if text:lower() == v  then
         text = "Hoşbuldum"
  end
    end

Kod: lua
-- Forbidden words
-- Not necessary to be full words. If they are found in a part of the word, the whole word if filtered
swearWords = {
"sik",
"got",
"göt",
"orospu",
"orspu",
"ospu",
"taşşak",
"veren",
"ibne",
"gavat",
"sikerim",
"ananı",
"anani",
"oç",
"oc",
"pezevenk",
"pzvnk",
"skrim",
"ceddini",
"tassak",
"TRS",
"TRF",
"amuna",
"amuha",
"goyam",
"amna",
"yarrak",
"yarak",
"ibne",
"goyim",
"pic",
"piç",
"p.c",
"s.kerim",
"koyam",
"amuna",
"koyem",
"amına",
"şerefsiz",
"or*spu"
}


-- Intercept chat messages
addEventHandler("onPlayerChat",getRootElement(),
function(msg,type)

-- Only affect normal messages
if type == 0 then

-- Cancel output
cancelEvent()

-- Clean up the message from any bad words
local new = ""
local iter = 0
for word in msg:gmatch("%S+") do
iter = iter + 1
for i,swr in ipairs(swearWords) do
local src = word:lower():gsub("%s","")
local src = src:gsub("#%x%x%x%x%x%x","")
local src = src:gsub("%c","")
local src = src:gsub("%p","")
local pat = swr:lower():gsub("%s","")
if src:find(pat) then
local replaceString = ""
for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do
replaceString = replaceString.."*"
end
word = word:gsub(word,replaceString)
end
end
if iter == 1 and word:len() > 2 then
word = word:gsub("%a",string.upper,1)
end
new = new..word.." "
end
if new ~= "" then msg = new end

-- Get appropriate team colors and output the clean message
local pTeam = getPlayerTeam(source)
if pTeam then
local r,g,b = getTeamColor(pTeam)
local hr,hg,hb = decToHex(r),decToHex(g),decToHex(b)
local color = "#"..hr..hg..hb
outputMessage(color..getPlayerName(source),msg)
else
outputMessage(getPlayerName(source),msg)
end
end
end)


-- Output preformatted message to the chatbox
function outputMessage(author,message)
--outputChatBox(author..": #E0D0B0"..message,getRootElement(),255,255,255,true)
end


-- Convert number from decimal to hexadecimal
function decToHex(num)
return string.format("%02X",num)
end
« Son Düzenleme: 14 Ocak 2018, 23:08:19 Gönderen: Narkoz »
 


MTASATURK

[YARDIM] Admin Tag
« : 14 Ocak 2018, 20:42:30 »