Jump to content

جمعة مباركة .. مشكلة صغيرة


MR.KFO

Recommended Posts

السلام عليكم عندي مشكلة بلوحة الادمن

انا مسوي 3 dxDrawText يعرفو من الي صك ميوت وكم المدة وووش السبب

  
--admin-main 
function mute( player, action, data, additional, additional2 ) 
local reason = data or "" 
local seconds = tonumber(additional) and tonumber(additional) > 0 and tonumber(additional) 
mdata = reason~="" and ( "(" .. reason .. ")" ) or "" 
more = seconds and ( "(" .. secondsToTimeDesc(seconds) .. ")" ) or "" 
dxDrawText ("Mute Reason : "..reason.."", 20, 288, 205, 302, tocolor(199, 235, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
dxDrawText ("Mute By : "..getPlayerName(source).."", 20, 307, 205, 321, tocolor(32, 143, 180, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
dxDrawText  ("Mute For : "..more.."", 20, 327, 205, 341, tocolor(213, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
end 
  
addEvent("kfo", true) 
addEventHandler("kfo", root, 
function () 
addEventHandler("onClientRender",getRootElement(),mute) 
end 
) 
addEvent("kfo1", true) 
addEventHandler("kfo1", root, 
function () 
removeEventHandler("onClientRender",getRootElement(),mute) 
end 
) 

  
--admin-server 
        elseif ( action == "mute" )  then 
            if ( isPlayerMuted ( player ) ) then action = "un"..action end 
            if getElementData( player ,"Account") == "kfo" then  exports["guimessages"]:outputServer(source, "* #BDBCB7"..getPlayerName(player).." #FF0000is the owner you cant mute him", 255, 100, 100) return end 
            local reason = data or "" 
            local seconds = tonumber(additional) and tonumber(additional) > 0 and tonumber(additional) 
            mdata = reason~="" and ( "(" .. reason .. ")" ) or "" 
            more = seconds and ( "(" .. secondsToTimeDesc(seconds) .. ")" ) or "" 
            aSetPlayerMuted ( player, not isPlayerMuted ( player ), seconds ) 
            if ( isPlayerMuted ( player ) ) then 
             exports["guimessages"]:outputServer(root, "*[Admin]: "..getPlayerName(player).." Has been Muted By "..getPlayerName(source)..""..more.."", 255, 0, 0) 
             exports["guimessages"]:outputServer(root, "#FFFFFFReason:"..reason..".", 255, 180, 0) 
             triggerClientEvent(player, "kfo", player) 
            playSoundFrontEnd(root, 49) 
            else 
             exports["guimessages"]:outputServer(root, "*#EB0B0B[Admin]: #56EB0B"..getPlayerName(player).." #EB0B0BHas been UnMuted By #FFE275"..getPlayerName(source).."!", 1, 254, 10) 
            playSoundFrontEnd(root, 14) 
            triggerClientEvent(player, "kfo1", player) 
            end 

ما يظهر اي شي ممكن حل ؟؟ :(

Link to comment

وعليكم السلام .. علينا وعليكـ

admin\server

admin_server.lua رح المسار هذا بملف الادمنية .. وافتح ملف

856 وبعدها روح لـ سطر

aSetPlayerMuted ( player, not isPlayerMuted ( player ), seconds ) اللي هو

حط هذا السطر تحته :

setElementData ( player, "muteData", { mdata, more, source } ) 

واحفظ الملف ..

وكودكـ التكست يصير كذا :

function muteTexts_ (   ) 
   if ( getElementData ( localPlayer, "muteData" ) ) then 
       local tableData = getElementData ( localPlayer, "muteData" ) 
       dxDrawText ( "Mute Reason : "..tableData [ 1 ], 20, 288, 205, 302, tocolor(199, 235, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
       dxDrawText ( "Mute For : "..tableData [ 2 ], 20, 327, 205, 341, tocolor(213, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
       dxDrawText ( "Mute By : "..tableData [ 3 ], 20, 307, 205, 321, tocolor(32, 143, 180, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
   end 
end 
  
addEvent ( "kfo", true ) 
addEventHandler ( "kfo", root, function (  ) 
     addEventHandler ( "onClientRender", root, muteTexts_ ) 
end ) 
  
  
addEvent ( "kfo1", true ) 
addEventHandler ( "kfo1", root, function (  ) 
    removeEventHandler ( "onClientRender", root, muteTexts_ ) 
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...