Jump to content

أوامر ترقية اللاعبين من اف٨


Recommended Posts

OR

local AllowedRanks = { "Console" , "??" } 

addCommandHandler ( "ACL" , function ( Player , _ , Type , AccountName , GroupName )
    if Type and AccountName and GroupName then
        local Account = getPlayerAccount ( Player)
        if Account and not isGuestAccount ( Account ) then
            for _ , Rank in pairs ( AllowedRanks ) do
                local AG = aclGetGroup ( Rank )
                if AG then
                    if isObjectInACLGroup ( "user." .. getAccountName ( Account ) , AG ) then
                        if not getAccount ( AccountName ) then
                            outputChatBox ( "ACL / ERROR : Account isn't exists" , Player , 255 , 0 , 0 )
                            return
                        end
                        local Group = aclGetGroup ( GroupName )
                        if not Group then
                            outputChatBox ( "ACL / ERROR : There's no acl group with this name" , Player , 255 , 0 , 0 )
                            return
                        end
                        local Type = Type:lower ( )
                        local Types = { ["add"] = true , ["remove"] = true }
                        if not Types [ Type ] then
                            outputChatBox ( "ACL / ERROR : Action must be ( add or remove )" , Player , 255 , 0 , 0 )
                            return
                        end
                        local Function = Type == "add" and aclGroupAddObject or aclGroupRemoveObject
                        if Function ( Group , "user." .. AccountName ) then
                            outputChatBox ( "ACL / Succsess : " .. AccountName .. " Added to " .. GroupName .. " Succsessfully" , Player , 0 , 255 , 0 )
                        else
                            outputChatBox ( "ACL / ERROR : Unknown error" , Player , 255 , 0 , 0 )
                        end
                        break
                    end
                end
            end
        end 
    end
end )

تقدر تحط الكود ذا في لوحه الادمن

و تكتب باف 8

ACL add Account_Name Group_Name -- لاعطاء الرتب

ACL remove Account_Name Group_Name -- لسحب الرتب

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