Jump to content

تصحيح اخطاء


Recommended Posts

  
addEventHandler("onClientGUIClick",resourceRoot, 
    function() 
    if  source == GUIEditor.button[6]  then 
    triggerServerEvent("yasTeam",localPlayer) 
    elseif  source == GUIEditor.button[7]  then 
    triggerServerEvent("noTeam",localPlayer) 
    end 
    end) 
  
  
 addEventHandler("onClientGUIClick",resourceRoot, 
    function() 
    if  source == GUIEditor.button[8]  then 
    triggerServerEvent("AD",localPlayer) 
    elseif  source == GUIEditor.button[8]  then 
    triggerServerEvent("noAD",localPlayer) 
    end 
    end) 

  
addEvent("yasTeam",true) 
addEventHandler("yesTeam", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        unbindKey(player, "y", "down", "chatbox", "Teamsay") 
  
end 
end ) 
  
addEvent("noTeam",true) 
addEventHandler("noLTeam", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        bindKey(player, "y", "down", "chatbox", "Teamsay") 
  
end 
end ) 
  
------------------------------------------ 
  
  
groups = { 
    "Console", 
    "Admin", 
    "SuperModerator", 
    "Moderator", 
    "Level 1", 
    "Level 2", 
    "Level 3", 
    "Level 4", 
    "Level 5", 
    "Level 6", 
    "Head.Admin", 
    "Owner", 
    "Leve16Plus", 
    "Level5Plus", 
    "Level4Plus", 
    "Level3Plus", 
    "Level2Plus", 
    "Level1Plus", 
    "AdminChat" 
} 
  
addCommandHandler("AdminChat", 
    function(player,cmd,...) 
        for theKey,theGroup in ipairs(groups) do 
            if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then 
                for theKey,theGroup in ipairs(groups) do 
                    for theKey,thePlayer in ipairs(getElementsByType("player")) do 
                        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then 
                            outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..table.concat({...}," "),thePlayer,255,0,0,true) 
                        end 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  
addEventHandler("onResourceStart",root, 
    function() 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            bindKey(thePlayer,"[","down","chatbox","AdminChat") 
        end 
    end 
) 
  
  
  
  
  
--------------------------------------------------------------- 
  
addEvent("AD",true) 
addEventHandler("AD", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        unbindKey(player, "[", "down", "chatbox", "AdminChat") 
  
end 
end ) 
  
addEvent("noAD",true) 
addEventHandler("noAD", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        bindKey(player, "[", "down", "chatbox", "AdminChat") 
  
end 
end ) 

1464371312481.png

Link to comment
  
  
addEventHandler("onClientGUIClick",resourceRoot, 
    function() 
    if  source == GUIEditor.button[6]  then 
    triggerServerEvent("yasTeam",localPlayer) 
    elseif  source == GUIEditor.button[7]  then 
    triggerServerEvent("noTeam",localPlayer) 
    end 
    end) 
  
  
    Addno = false; 
  
 addEventHandler("onClientGUIClick",resourceRoot, 
    function() 
    if  source == GUIEditor.button[8] and Addno == false then 
    Addno = true; 
    triggerServerEvent("AD",localPlayer) 
    elseif  source == GUIEditor.button[8] and Addno == true then 
    Addno = false; 
    triggerServerEvent("noAD",localPlayer) 
    end 
    end) 
     
  

  
  
addEvent("yasTeam",true) 
addEventHandler("yesTeam", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        unbindKey(player, "y", "down", "chatbox", "Teamsay") 
  
end 
end ) 
  
addEvent("noTeam",true) 
addEventHandler("noTeam", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        bindKey(player, "y", "down", "chatbox", "Teamsay") 
  
end 
end ) 
  
------------------------------------------ 
  
  
groups = { 
    "Console", 
    "Admin", 
    "SuperModerator", 
    "Moderator", 
    "Level 1", 
    "Level 2", 
    "Level 3", 
    "Level 4", 
    "Level 5", 
    "Level 6", 
    "Head.Admin", 
    "Owner", 
    "Leve16Plus", 
    "Level5Plus", 
    "Level4Plus", 
    "Level3Plus", 
    "Level2Plus", 
    "Level1Plus", 
    "AdminChat" 
} 
  
addCommandHandler("AdminChat", 
    function(player,cmd,...) 
        for theKey,theGroup in ipairs(groups) do 
            if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(theGroup)) then 
                for theKey,theGroup in ipairs(groups) do 
                    for theKey,thePlayer in ipairs(getElementsByType("player")) do 
                        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)),aclGetGroup(theGroup)) then 
                            outputChatBox("(ADMIN) "..getPlayerName(player)..": #ffffff"..table.concat({...}," "),thePlayer,255,0,0,true) 
                        end 
                    end 
                    return 
                end 
            end 
        end 
    end 
) 
  
addEventHandler("onResourceStart",root, 
    function() 
        for theKey,thePlayer in ipairs(getElementsByType("player")) do 
            bindKey(thePlayer,"[","down","chatbox","AdminChat") 
        end 
    end 
) 
  
  
  
  
  
--------------------------------------------------------------- 
  
addEvent("AD",true) 
addEventHandler("AD", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        unbindKey(player, "[", "down", "chatbox", "AdminChat") 
  
end 
end ) 
  
addEvent("noAD",true) 
addEventHandler("noAD", root, 
function() 
    for i, player in pairs(getElementsByType("player")) do 
        bindKey(player, "[", "down", "chatbox", "AdminChat") 
  
end 
end ) 
  

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