Jump to content

طلب كود او شي


mR.Z

Recommended Posts

بسم الله الرحمن الرحيم

ابي منكم طلب ماعرفت له :(

الي هوا اذا احد صك واحد باند بدون سبب ماينصك يجيه كلام بشات لازم يحط سبب ونفس الشي معى الميوت

وابي اذا احد صك ميوت ماحد يقدر يفتحه الى الي صكه

وبس اتمنى فيه طريقه :(

Link to comment

الطريقه طويله وماهي سهله , زي ماقالك عدل على الملفين

admin_server أو admin_main

واذا منت عارف ما انصحك تحاول لأنها

لو تعدل شي بسيط ومنت عارف وش هو

اللوحه كلها خربت

لازم تكون محترف او لا تسوي شي

وانت حاول وحنا بنكمل لك او نساعدك

Link to comment

لا , الكود سهل جداً لأنك راح تضيف سطر واحد وهو التحقق ..

وآسف أنا كنت غلطان بأسماء الملفات فوق , لأن الفنكشنات الموجودة فيه صارت في ملف ثاني -.-

عموماً ..

روح لملف admin/client/gui/admin_inputbox.lua

سطر 265 وظيفة aBanInputBoxFinish

واستبدله بالكود هذا :

function aBanInputBoxFinish () 
    -- Get options 
    local bUseIP     = guiRadioButtonGetSelected( aBanInputRadio1A ) 
    local bUseSerial = guiRadioButtonGetSelected( aBanInputRadio1B ) 
  
    -- Get duration 
    local seconds = false 
    for i,dur in ipairs(aBanDurations) do 
        if guiRadioButtonGetSelected( aBanInputRadio2s[i] ) then 
            if guiGetText(aBanInputRadio2s[i]) == "Custom:" then 
                if guiComboBoxGetItemText(customType, guiComboBoxGetSelected(customType)) == "Mins" then 
                 seconds = guiGetText(customDuration) * 60 
                elseif guiComboBoxGetItemText(customType, guiComboBoxGetSelected(customType)) == "Hours" then 
                 seconds = guiGetText(customDuration) * 3600 
                elseif guiComboBoxGetItemText(customType, guiComboBoxGetSelected(customType)) == "Days" then 
                 seconds = guiGetText(customDuration) * 86400 
                end 
            else 
            seconds = dur 
            end 
        end 
    end 
  
    -- Get reason 
    local reason = guiGetText ( aBanInputValue ) 
  
    -- Validate settings 
    if not bUseIP and not bUseSerial then 
        aMessageBox ( "error", "No type selected!" ) 
        return 
    end 
  
    if seconds == false then 
        aMessageBox ( "error", "No duration selected!" ) 
        return 
    end 
     
    -- Send ban info to the server 
    if reason == "" then return aMessageBox ( "error", "Please enter the ban reason!" ); end 
    triggerServerEvent ( "aPlayer", localPlayer, aBanInputPlayer, "ban", reason, seconds, bUseSerial ) 
             
     
     
    -- Clear input 
    guiSetText ( aBanInputValue, "" ) 
    for i,dur in ipairs(aBanDurations) do 
        guiRadioButtonSetSelected( aBanInputRadio2s[i], false )  
    end 
end 

وحق الميوت

في نفس الملف

سطر 431 وظيفة aMuteInputBoxFinish

واستبدله بالكود ذا :

function aMuteInputBoxFinish () 
    -- Get duration 
    local seconds = false 
    for i,dur in ipairs(aMuteDurations) do 
        if guiRadioButtonGetSelected( aMuteInputRadio2s[i] ) then 
            seconds = dur 
        end 
    end 
  
    -- Get reason 
    local reason = guiGetText ( aMuteInputValue ) 
  
    -- Validate settings 
    if seconds == false then 
        aMessageBox ( "error", "No duration selected!" ) 
        return 
    end 
  
    -- Send mute info to the server 
    if reason == "" then return aMessageBox ( "error", "Please enter the mute reason!" ); end 
    triggerServerEvent ( "aPlayer", localPlayer, aMuteInputPlayer, "mute", reason, seconds ) 
  
    -- Clear input 
    guiSetText ( aMuteInputValue, "" ) 
    for i,dur in ipairs(aMuteDurations) do 
        guiRadioButtonSetSelected( aMuteInputRadio2s[i], false )  
    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...