Jump to content

x [ تعديل ] x تكرار


Recommended Posts

السلام عليكم

دلوقتي ده كود العب يقدر يعطي نفسه تاج

بس يكرر مع التاج الاصلي

مغ اني حاتط تحقق

addEventHandler("onPlayerChat",root,function (msg,Colour) 
local tag = getElementData(source,"tag") or '#FF0000[#005588Player#FF0000]'   
local colour = getElementData(source,"colour") or '#FFFFFF'   
outputChatBox(tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. msg,root, r, g, b, true) 
return cancelEvent() 
end) 

addEventHandler("onPlayerChat", root, playerChat) 
      
addEvent("onPlayeropenChat",true) 
addEventHandler("onPlayeropenChat",root,function () 
removeElementData(resourceRoot,"chat") 
end) 
  
addEvent("onPlayerCloseChat",true) 
addEventHandler("onPlayerCloseChat",root,function () 
setElementData (resourceRoot, "chat",true) 
end) 
    ------ 
    addEventHandler("onPlayerChat",root, 
    function( text, type) 
    if getElementData(source,"Data_Tag") then return cancelEvent() end 
    if getElementData(source,"tag") == true then return cancelEvent() end 
    if type == 1 or type == 2 then return end 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
    cancelEvent() 
    local r, g, b = getPlayerNametagColor(source) 
    return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
    else 
    end 
    if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then 
    cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
         elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
                
         elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
                
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
          
        end 
        end 
         ) 

Link to comment

جرب

addEventHandler("onPlayerChat",root, 
function( text, type) 
local tag = getElementData(source,"tag") or  "#5494A7* [ AL-MLOoK ] " 
local colour = getElementData(source,"colour") or '#FFFFFF'   
if getElementData(source,"Data_Tag") then return cancelEvent() end 
if getElementData(source,"tag") == true then return cancelEvent() end 
if type == 1 or type == 2 then return end 
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
cancelEvent() 
local r, g, b = getPlayerNametagColor(source) 
return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b,  
  
true ) 
else 
end 
if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been  
  
locked by Console ",source,255,0,0,true) end 
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then 
cancelEvent() 
local r, g, b = getPlayerNametagColor(source) 
outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then 
cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
             elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
                    
                    
             elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                    
                    
            elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement 
  
(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
outputChatBox(tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. text, getRootElement(), r, g, b, true ) 
end 
end) 
Link to comment

جرب كذا

addEvent("onPlayeropenChat",true) 
addEventHandler("onPlayeropenChat",root,function () 
removeElementData(resourceRoot,"chat") 
end) 
  
addEvent("onPlayerCloseChat",true) 
addEventHandler("onPlayerCloseChat",root,function () 
setElementData (resourceRoot, "chat",true) 
end) 
    ------ 
    addEventHandler("onPlayerChat",root, 
    function( text, type) 
    if type == 1 or type == 2 then return end 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
    cancelEvent() 
    local r, g, b = getPlayerNametagColor(source) 
    return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
    else 
    end 
    if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end 
        if getElementData(source,"Data_Tag") == true or getElementData(source,"tag") == true then cancelEvent() return end 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then 
    cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
         elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
                
         elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
                
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
          
        end 
        end 
         ) 

Link to comment
جرب

addEventHandler("onPlayerChat",root, 
function( text, type) 
local tag = getElementData(source,"tag") or  "#5494A7* [ AL-MLOoK ] " 
local colour = getElementData(source,"colour") or '#FFFFFF'   
if getElementData(source,"Data_Tag") then return cancelEvent() end 
if getElementData(source,"tag") == true then return cancelEvent() end 
if type == 1 or type == 2 then return end 
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
cancelEvent() 
local r, g, b = getPlayerNametagColor(source) 
return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b,  
  
true ) 
else 
end 
if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been  
  
locked by Console ",source,255,0,0,true) end 
if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then 
cancelEvent() 
local r, g, b = getPlayerNametagColor(source) 
outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then 
cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
             elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(),  
  
r, g, b, true ) 
                    
                    
             elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                    
                    
            elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text,  
  
getRootElement(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
                    outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement 
  
(), r, g, b, true ) 
              
              
               elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
             cancelEvent() 
                    local r, g, b = getPlayerNametagColor(source) 
outputChatBox(tag ..' '.. getPlayerName(source) .. ''..colour..' : '.. text, getRootElement(), r, g, b, true ) 
end 
end) 

يا اخ اوسكار

انت ليه دمجت المود الاول مع المود التاني

كده لما العب يحط اسم التاج

و يضغط البطن كيف يتفعل بدون تريفر للسيرفر ؟

جرب كذا
addEvent("onPlayeropenChat",true) 
addEventHandler("onPlayeropenChat",root,function () 
removeElementData(resourceRoot,"chat") 
end) 
  
addEvent("onPlayerCloseChat",true) 
addEventHandler("onPlayerCloseChat",root,function () 
setElementData (resourceRoot, "chat",true) 
end) 
    ------ 
    addEventHandler("onPlayerChat",root, 
    function( text, type) 
    if type == 1 or type == 2 then return end 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Console")) then 
    cancelEvent() 
    local r, g, b = getPlayerNametagColor(source) 
    return outputChatBox("#FF0000* [ Console ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
    else 
    end 
    if getElementData ( resourceRoot, "chat" ) == true then cancelEvent() return outputChatBox ("[C.Console]: Chat has been locked by Console ",source,255,0,0,true) end 
        if getElementData(source,"Data_Tag") == true or getElementData(source,"tag") == true then cancelEvent() return end 
    if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 1")) then 
    cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#0099DC* [ Lv.1 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 2")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#2554C7* [ Lv.2 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 3")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#00cc11* [ Lv.3 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 4")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#007700* [ Lv.4 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 5")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#cc0000* [ Lv.5 ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Level 6")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#FF0000* [ Lv.6 ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Head.Admin")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#C11B17* [ Head.Admin ] " .. getPlayerName ( source ) ..": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
         elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("V.I.P")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#DCD800* [ VIP ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
                
         elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("SaedAmer")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#cd0000* [ VIP ]#ffff00 سعيد : #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
                
        elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("mosp")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#02AB2F* [ AL-MLOok Event's] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Manager")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#347235* [ T-Developer ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Admin - Ex")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#777777* [ Admin - EX ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Police")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#007F7F* [ Soldier ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
          
          
           elseif isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then 
         cancelEvent() 
                local r, g, b = getPlayerNametagColor(source) 
                outputChatBox("#5494A7* [ AL-MLOoK ] " .. getPlayerName ( source ) .. ": #ffFFff" .. text, getRootElement(), r, g, b, true ) 
                
          
        end 
        end 
         ) 

نفس الشئ

يكرر

Link to comment
الترايقر مالهوش دخل باللي سويته

الكود الاول

تبع لوحة تسوي تاج بالشات

و الكود التاني تبع مود التاجات للسيرفر كلو

فاهم انا دمجتهم على بعض عشان مايكرر الكلام مرتين بالشات

Link to comment
الترايقر مالهوش دخل باللي سويته

الكود الاول

تبع لوحة تسوي تاج بالشات

و الكود التاني تبع مود التاجات للسيرفر كلو

فاهم انا دمجتهم على بعض عشان مايكرر الكلام مرتين بالشات

جربته ما شتغل التاجين اساسا

Link to comment
اطرح الكلنت اضبطه لك

كلنت حق وش ؟

+

الدي بق

unfinished string near '"[C.Console]: Chat has been' 16

'=' expected near 'by' 18

ambiguous syntax (function call x new statement) near '(' 114

'' expected near 'elseif' 117

'' expected near 'end' 121

'' expected near 'end' 122

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...