Jump to content

تعديل


Adham

Recommended Posts

سلام عليكم الكود لما لما امسح الشات في القريد لست

بيمسح لاي حد

مش القروبات المحدده؟

وعاوز ال button

يقفل ويفتح للقروبات المجدهه

سرفر :

groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEventHandler("onPlayerLogin",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "isAdmin", true ) 
        end   
   end 
) 
  
  
addEventHandler("onPlayerLogout",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "isAdmin", false ) 
        end   
   end 
) 
  
  
  
addEventHandler("onResourceStart",root, 
    function () 
        for _ , v in ipairs(getElementsByType("player")) do -- جيب كل اللاعبين 
            if isPlayerAdmin(v) then 
               setElementData(v, "isAdmin", true) 
            end 
        end 
    end 
) 
  
function clearChat() 
    local name = getPlayerName(source) 
    for _ , v in ipairs(getElementsByType("player")) do 
        triggerClientEvent(v, "clearrows", v, name) 
    end 
end 
  
addEvent("clearChat", true) 
addEventHandler("clearChat", root, clearChat) 
  

كلنت

  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
            if getElementData(localPlayer, "isAdmin") then 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GridList) then 
        local row = guiGridListAddRow(GridList) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GridList, row, 1, text, false, false) 
        guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 

Link to comment

انت ما تحققت انه لاعب كونسل او ادمن ابد ’@,

  
-- Server 
groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEvent("clearChat",true) 
addEventHandler("clearChat",root, 
function (name) 
        if not isPlayerAdmin(source) then return end 
        triggerClientEvent(source,"clearrows",source,name) 
end 
) 
  
  

  
-- Client  
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GridList) then 
        local row = guiGridListAddRow(GridList) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GridList, row, 1, text, false, false) 
        guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 
  

Link to comment

جرب كدا

  
  
server 
  
groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEventHandler("onPlayerLogin",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "groupAdmins", true ) 
        end   
   end 
) 
  
  
addEventHandler("onPlayerLogout",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "groupAdmins", false ) 
        end   
   end 
) 
  
  
  
addEventHandler("onResourceStart",root, 
    function () 
        for _ , v in ipairs(getElementsByType("player")) do 
            if isPlayerAdmin(v) then 
               setElementData(v, "groupAdmins", true) 
            end 
        end 
    end 
) 
  
function clearChat() 
    local name = getPlayerName(source) 
    for _ , v in ipairs(getElementsByType("player")) do 
        triggerClientEvent(v, "clearrows", v, name) 
    end 
end 
  
addEvent("clearChat", true) 
addEventHandler("clearChat", root, clearChat) 

........

  
  
Client 
groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEventHandler("onPlayerLogin",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "groupAdmins", true ) 
        end   
   end 
) 
  
  
addEventHandler("onPlayerLogout",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "groupAdmins", false ) 
        end   
   end 
) 
  
  
  
addEventHandler("onResourceStart",root, 
    function () 
        for _ , v in ipairs(getElementsByType("player")) do 
            if isPlayerAdmin(v) then 
               setElementData(v, "groupAdmins", true) 
            end 
        end 
    end 
) 
  
function clearChat() 
    local name = getPlayerName(source) 
    for _ , v in ipairs(getElementsByType("player")) do 
        triggerClientEvent(v, "clearrows", v, name) 
    end 
end 
  
addEvent("clearChat", true) 
addEventHandler("clearChat", root, clearChat) 

Link to comment
addEventHandler("onClientGUIClick", root, 
    function() 
    localPlayer = player  
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GridList) then 
        local row = guiGridListAddRow(GridList) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GridList, row, 1, text, false, false) 
        guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 

Link to comment
addEventHandler("onClientGUIClick", root, 
    function() 
    localPlayer = player  
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GridList) then 
        local row = guiGridListAddRow(GridList) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GridList, row, 1, text, false, false) 
        guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 

مايحتاج تعرف اللوكال بلاير ,@

لانه لوكال بلاير هو سورس

Link to comment
addEventHandler("onClientGUIClick", root, 
    function() 
    localPlayer = player  
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GridList) then 
        local row = guiGridListAddRow(GridList) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GridList, row, 1, text, false, false) 
        guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 

مايحتاج تعرف اللوكال بلاير ,@

لانه لوكال بلاير هو سورس

اها

بس شو الفرق لو

triggerServerEvent("clearChat", localPlayer,name) 

لو يخليها كدا شو الفرق؟؟؟

triggerServerEvent("clearChat", Player,name) 

Link to comment
addEventHandler("onClientGUIClick",GUIEditor.button[1],function () 
    if guiGetText(GUIEditor.edit[1]) ~= '' then 
    triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) 
    guiSetText (GUIEditor.edit[1], "" ) 
    else 
    guiSetEnabled(GUIEditor.button[1], false) 
     setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) 
    end 
    end, false) 
    addEvent("sendmessage2",true) 
    addEventHandler("sendmessage2",root, function(Name,Text) 
    local gg = guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) 
    guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) 
    if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then 
     outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) 
    end 
    end) 
  
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
            if getElementData(localPlayer, "isAdmin") then 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GUIEditor.gridlist[1]) then 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, text, false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 
  
  
  
  

Link to comment
addEventHandler("onClientGUIClick",GUIEditor.button[1],function () 
    if guiGetText(GUIEditor.edit[1]) ~= '' then 
    triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) 
    guiSetText (GUIEditor.edit[1], "" ) 
    else 
    guiSetEnabled(GUIEditor.button[1], false) 
     setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) 
    end 
    end, false) 
    addEvent("sendmessage2",true) 
    addEventHandler("sendmessage2",root, function(Name,Text) 
    local gg = guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) 
    guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) 
    if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then 
     outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) 
    end 
    end) 
  
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
            if getElementData(localPlayer, "isAdmin") then 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GUIEditor.gridlist[1]) then 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        local text = name:gsub("#%x%x%x%x%x%x","").." Cleared Chat " 
        local t=guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, text, false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 
  
  
  
  

  
  
addEventHandler("onClientGUIClick",GUIEditor.button[1],function () 
    if guiGetText(GUIEditor.edit[1]) ~= '' then 
    triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) 
    guiSetText (GUIEditor.edit[1], "" ) 
    else 
    guiSetEnabled(GUIEditor.button[1], false) 
     setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) 
    end 
    end, false) 
    addEvent("sendmessage2",true) 
    addEventHandler("sendmessage2",root, function(Name,Text) 
    local gg = guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) 
    guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) 
    if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then 
     outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) 
    end 
    end) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
    if guiGridListClear(GridList) then 
        local row = guiGridListAddRow(GridList) 
        guiGridListSetItemText(GridList, row, 1,name.." Cleared Chat ", false, false) 
        guiGridListSetItemColor(GridList, row, 1, 255, 0, 0) 
    end 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 
  

واطرح السيرفر

Link to comment
groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEventHandler("onPlayerLogin",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "isAdmin", true ) 
        end   
   end 
) 
  
  
addEventHandler("onPlayerLogout",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "isAdmin", false ) 
        end   
   end 
) 
  
  
  
addEventHandler("onResourceStart",root, 
    function () 
        for _ , v in ipairs(getElementsByType("player")) do -- جيب كل اللاعبين 
            if isPlayerAdmin(v) then 
               setElementData(v, "isAdmin", true) 
            end 
        end 
    end 
) 
  
function clearChat() 
    local name = getPlayerName(source) 
    for _ , v in ipairs(getElementsByType("player")) do 
        triggerClientEvent(v, "clearrows", v, name) 
    end 
end 
  
addEvent("clearChat", true) 
addEventHandler("clearChat", root, clearChat) 
  

Link to comment
groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEventHandler("onPlayerLogin",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "isAdmin", true ) 
        end   
   end 
) 
  
  
addEventHandler("onPlayerLogout",root, 
    function () 
        if isPlayerAdmin(source)  then 
            setElementData ( source, "isAdmin", false ) 
        end   
   end 
) 
  
  
  
addEventHandler("onResourceStart",root, 
    function () 
        for _ , v in ipairs(getElementsByType("player")) do -- جيب كل اللاعبين 
            if isPlayerAdmin(v) then 
               setElementData(v, "isAdmin", true) 
            end 
        end 
    end 
) 
  
function clearChat() 
    local name = getPlayerName(source) 
    for _ , v in ipairs(getElementsByType("player")) do 
        triggerClientEvent(v, "clearrows", v, name) 
    end 
end 
  
addEvent("clearChat", true) 
addEventHandler("clearChat", root, clearChat) 
  

  
  
-- Server 
groupAdmins = {"Console","Admin"} -- حط القروبات اللي تمسح و يكون البوتون عندها مفتوح 
  
function isPlayerAdmin(  player  ) 
    local aPlayerAccount = getPlayerAccount( player ) 
    if ( not aPlayerAccount or isGuestAccount( aPlayerAccount ) ) then return false end 
    local aPlayerAccountName=getAccountName(aPlayerAccount) 
    for _ , Group in ipairs (   groupAdmins   ) do 
        if isObjectInACLGroup("user."..aPlayerAccountName, aclGetGroup(Group)) then 
            return true 
        end 
    end 
end 
  
addEvent("clearChat",true) 
addEventHandler("clearChat",root, 
function (name) 
        if not isPlayerAdmin(source) then return end 
        triggerClientEvent(source,"clearrows",source,name) 
end 
) 
  
  
  

Link to comment

طيب جرب كذا ,

  
 -- Client 
  
addEventHandler("onClientGUIClick",GUIEditor.button[1],function () 
    if guiGetText(GUIEditor.edit[1]) ~= '' then 
    triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) 
    guiSetText (GUIEditor.edit[1], "" ) 
    else 
    guiSetEnabled(GUIEditor.button[1], false) 
     setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) 
    end 
    end, false) 
    addEvent("sendmessage2",true) 
    addEventHandler("sendmessage2",root, function(Name,Text) 
    local gg = guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) 
    guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) 
    if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then 
     outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) 
    end 
    end) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
guiGridListClear(GridList) 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], row, 1," "..name.." Cleared Chat ", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 
  

Link to comment
طيب جرب كذا ,
  
 -- Client 
  
addEventHandler("onClientGUIClick",GUIEditor.button[1],function () 
    if guiGetText(GUIEditor.edit[1]) ~= '' then 
    triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) 
    guiSetText (GUIEditor.edit[1], "" ) 
    else 
    guiSetEnabled(GUIEditor.button[1], false) 
     setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) 
    end 
    end, false) 
    addEvent("sendmessage2",true) 
    addEventHandler("sendmessage2",root, function(Name,Text) 
    local gg = guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) 
    guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) 
    if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then 
     outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) 
    end 
    end) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
    end 
) 
  
function clearChat(name) 
guiGridListClear(GridList) 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], row, 1," "..name.." Cleared Chat ", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 
  

اند زائدة سطر33

addEventHandler("onClientGUIClick",GUIEditor.button[1],function () 
    if guiGetText(GUIEditor.edit[1]) ~= '' then 
    triggerServerEvent("support",localPlayer,guiGetText(GUIEditor.edit[1])) 
    guiSetText (GUIEditor.edit[1], "" ) 
    else 
    guiSetEnabled(GUIEditor.button[1], false) 
     setTimer(guiSetEnabled, 3000, 1, GUIEditor.button[1], true) 
    end 
    end, false) 
    addEvent("sendmessage2",true) 
    addEventHandler("sendmessage2",root, function(Name,Text) 
    local gg = guiGridListAddRow(GUIEditor.gridlist[1]) 
    guiGridListSetItemText(GUIEditor.gridlist[1],gg, 1, Name:gsub("#%x%x%x%x%x%x", "") .. " : " .. Text , false, false) 
    guiGridListSetItemColor(GUIEditor.gridlist[1],gg, 1, 0, 255, 0, 255) 
    if ( guiCheckBoxGetSelected( GUIEditor.checkbox[1] ) == true ) then 
     outputChatBox("[support-System] #FF0000"..Name.."#FFFFFF : #00FF00"..guiGetText(GUIEditor.edit[1]),255,255,0,true) 
    end 
    end) 
  
addEventHandler("onClientGUIClick", root, 
    function() 
        if source == GUIEditor.button[1] then 
            local text = guiGetText(GUIEditor.edit[1]) 
              local name = getPlayerName(source) 
                if text == "clr" then 
                    triggerServerEvent("clearChat", localPlayer,name) 
                end 
            end 
        end 
) 
  
function clearChat(name) 
guiGridListClear(GridList) 
        local row = guiGridListAddRow(GUIEditor.gridlist[1]) 
        guiGridListSetItemText(GUIEditor.gridlist[1], row, 1," "..name.." Cleared Chat ", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], row, 1, 255, 0, 0) 
end 
  
addEvent("clearrows", true) 
addEventHandler("clearrows", root, clearChat) 

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