[YARDIM] Komutu sadece Admin grubu kullanabilsin istiyorum

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı WipHandLes

  • Yeni Üye
  • *
    • İleti: 4
function input_Console ( text )
       
        if ( getElementType ( source ) == "player" ) then
               
                local command = gettok ( text, 1, 32 )
               
                if ( command == "ss" ) then
                       
                       
                       
                        local actionText = string.sub ( text, 3 )
                       
                        outputChatBox ( "[DUYURU] " .. actionText, getRootElement(), 255, 0, 0 )
                end
        end
end


addEventHandler ( "onConsole", getRootElement(), input_Console )

Bu scriptte acl admin grubunda olmayan kullanıcılar duyuru komutunu kullanamaması gerek. Bu konuda yardımınıza ihtiyacım var
 


MTASATURK


Çevrimdışı Berkan52

  • Yeni Üye
  • *
    • İleti: 29
Linki görebilmek için Kayıt olun yada Giriş yapın.
function input_Console ( text )
       
        if ( getElementType ( source ) == "player" ) then
               
                local command = gettok ( text, 1, 32 )
               
                if ( command == "ss" ) then
                       
                       
                       
                        local actionText = string.sub ( text, 3 )
                       
                        outputChatBox ( "[DUYURU] " .. actionText, getRootElement(), 255, 0, 0 )
                end
        end
end


addEventHandler ( "onConsole", getRootElement(), input_Console )

Bu scriptte acl admin grubunda olmayan kullanıcılar duyuru komutunu kullanamaması gerek. Bu konuda yardımınıza ihtiyacım var


function input_Console(text, source)
    if (getElementType(source) == "player") then
        local command = gettok(text, 1, 32)

        -- Admin ACL grubunun adını buraya ekleyin
        local adminGroupName = "admin"

        -- Oyuncu bu ACL grubuna üye mi kontrol ediyoruz
        if isPlayerInACL(source, adminGroupName) then
            if (command == "ss") then
                local actionText = string.sub(text, 3)
                outputChatBox("[DUYURU] " .. actionText, getRootElement(), 255, 0, 0)
            end
        end
    end
end

addEventHandler("onConsole", getRootElement(), input_Console)


Kardeşim test edip haber verebilir misin?
Linki görebilmek için Kayıt olun yada Giriş yapın.