Jump to content

مساعده فالتاج


HelpGuys

Recommended Posts

g_Root = getRootElement()
local chatTime = {}
local lastChatMessage = {}
klamSB = {"كلمات سيئة بعدين احطها",
           "كلمات سيئة بعدين احطها"}
klamNSHR = {"سيرفر",
            "البحث",
            "سيــرفر",
            "بسيرفر",        
            "اكتب",
            "سـيـرفـر",
            "رتب",
            "آكتب",
            "حياكم",
            "حيااكم",              
            "حيآكم",
            "لايفوتكم",
            "حصريات",
            "أكتب"}
addEventHandler('onPlayerChat', g_Root,
    function(msg, type)
        if type == 0 then
            cancelEvent()
            if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then
                outputChatBox("لا تكرر نفس رسالة", source, 255, 0, 0 )
                return
            else
                chatTime[source] = getTickCount()
            end
            if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then
                outputChatBox("لا تكرر وراء بعض", source, 255, 0, 0 )
                return
            else
                lastChatMessage[source] = msg
            end
            for k,v in ipairs (klamSB) do
                if string.find(msg,v) then
                    cancelEvent()
                   return  outputChatBox(" { مَا يَلْفِظُ مِن قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ }  ..", source, 255, 0, 0 )
                end
          end
            for k,v in ipairs (klamNSHR) do
                if string.find(msg,v) then
                    cancelEvent()
                   return  outputChatBox("روح انشر بعيد ..", source, 255, 0, 0 )
                end
          end        
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then
        local r, g, b = getPlayerNametagColor(source)        
        outputChatBox("#FF0000✖ ][ #FFFFFF Console #FF0000✖ ][ " .. getPlayerName ( source ) .."#cccccc : "..msg , g_Root, r, g, b, true )
        outputServerLog("CHAT: #FF0000✖ ][ #FFFFFF Console #FF0000✖ ][" .. getPlayerName ( source ) .. ": " .. msg)

    elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Time")) then
        local r, g, b = getPlayerNametagColor(source)        
        outputChatBox("#FF9900* #ffffff[ #FF9900king of time #ffffff]" .. getPlayerName ( source ) .."#FFFFFF : " .. msg, g_Root, r, g, b, true )
        outputServerLog("CHAT: [Head Admin] " .. getPlayerName ( source ) .. ": " .. msg)

    elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then
        local r, g, b = getPlayerNametagColor(source)        
        outputChatBox("#E6FF00* #ffffff[ #E6FF00V#000000.#E6FF00I#000000.#E6FF00P #ffffff] " .. getPlayerName ( source ) .."#FFFFFF : " .. msg, g_Root, r, g, b, true )
        outputServerLog("CHAT: [Admin] " .. getPlayerName ( source ) .. ": " .. msg)
               
elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin.Genral")) then
        local r, g, b = getPlayerNametagColor(source)        
        outputChatBox("#3D8BFF* #ffffff[ #3D8BFFAdmin.Genral #ffffff] " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true )
        outputServerLog("CHAT: #3D8BFF* #ffffff[ #3D8BFFAdmin.Genral #ffffff] " .. getPlayerName ( source ) .. ": " .. msg)

        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Mangars")) then
        local r, g, b = getPlayerNametagColor(source)        
        outputChatBox("#66FF00* #ffffff彡 #66FF00Managers #ffffff彡 " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true )
        outputServerLog("CHAT: #66FF00* #ffffff彡 #66FF00Managers #ffffff彡 " .. getPlayerName ( source ) .. ": " .. msg)

        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Mangaer")) then
        local r, g, b = getPlayerNametagColor(source)        
        outputChatBox("#000000* #ffffff[ #000000Manager Server #ffffff] " .. getPlayerName ( source ) .. "#FFFFFF : " .. msg, g_Root, r, g, b, true )
        outputServerLog("CHAT: #000000* #ffffff[ #000000Manager Server #ffffff] " .. getPlayerName ( source ) .. ": " .. msg)	
                         

      
        elseif type == 0 then
        cancelEvent ( )
        local r, g, b = getPlayerNametagColor(source)
       
        outputChatBox ( " " .. getPlayerName ( source ) .. ":#ffFFff " .. msg, g_Root, r, g, b, true )
        outputServerLog( "CHAT: " .. getPlayerName ( source ) .. ": " .. msg )
           
           
        end
        end
    end
)

 

local root = getRootElement()
 
function chatbox(text, msgtype)
local systemDBconnect = dbConnect( 'sqlite', ':1xXTAGS/[TAGS system] Database.db' ) 
local checkTag = dbQuery( systemDBconnect, ' SELECT * FROM TagsSystemPro WHERE serial = ? ', getAccountName( getPlayerAccount( source ) ) ) 
local dbValues = dbPoll( checkTag, -1 ) 
if ( type( dbValues ) == 'table' and #dbValues ~= 0 ) then 
local state = dbValues[1]['state'] 
if ( state == 'Enabled' ) then return end end
    local account = getAccountName(getPlayerAccount(source))
    local name = getPlayerName(source)
 cancelEvent()
    if isObjectInACLGroup("user." .. account, aclGetGroup("NO")) then
        outputChatBox("NO" .. text, root, 255, 255, 255, true)

هذا الكود بدي اضيفه له لما ضفته صار ميشتغل :( ارجو الحل

Edited by HelpGuys
Link to comment

بإختصار شديد تبي تضيف التاجات الخاصه على مود التاج

ويوم حطيت هذا الكود قام يتكرر - مايظهر

بإختصار انت تبيه لما يكون معه تاج خاص يطلع التاج الخاص لوحده ولو ماكان معه يظهر تاج الرتبه

صحيح ؟

Link to comment
On 18/01/2018 at 00:48, Rakan# said:

بإختصار شديد تبي تضيف التاجات الخاصه على مود التاج

ويوم حطيت هذا الكود قام يتكرر - مايظهر

بإختصار انت تبيه لما يكون معه تاج خاص يطلع التاج الخاص لوحده ولو ماكان معه يظهر تاج الرتبه

صحيح ؟

عليك نوور يخي بس انا لما ركبت هذا الكود حقت تاج الخاص صار ميشتغل المود معرفت كيف اركبه

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...