Jump to content

بسئلكم عن فنكش


Recommended Posts

شباب الحين فيه فنكش اسمه 
  
GetPlayerConsole 
  
اعطاء الاعب كونسل؟؟؟؟ 

Get بعدين لو في فنكشن كذا كان تلقى الفنكشن الي كتبته انت ملون + لو تفهم انت انجليزي كان تشوف كلمة

من المنطق هذي الكلمة يعني يجيب معلومة معينة عن اللاعب مب يعطي

:lol::lol:

Link to comment
عادي تقدر انت تسوي الفنكشن
getPlayerConsole = function (  )  
--  
end 

ممكن تفهمني كيف؟

usefull funcition يعني ان تتصنع كود بنفسك مثل لمن تروح الام تي اي في خيار هناك اسمه كذا

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

Link to comment

الوظيفه غير موجوده ,

بس تقدر تسويها , كـ مثال :

addAccountToConsole = function ( plr , name ) 
    if name and tostring ( name ) and plr and isElement ( plr ) and getElementType ( plr ) == 'player' then 
        local acc = getPlayerAccount ( plr ) 
            if not acc or isGuestAccount ( acc ) then return end 
                if isObjectInACLGroup ( 'user.'.. getAccountName ( acc ) , aclGetGroup ( 'Console' ) ) then 
                    if not isObjectInACLGroup ( 'user.'.. name , aclGetGroup ( 'Console' ) ) then 
                        aclGroupAddObject ( aclGetGroup( 'Console' ), 'user.' .. name ) 
            else 
                return false  
            end 
        else     
                return false  
            end 
    else 
            return false 
        end 
    return name or false 
end 
  
addCommandHandler ( 'add_', function ( plr , _, name ) 
    local name = addAccountToConsole ( plr, name ) 
        if not name then return false end 
            outputChatBox ( 'Warning ! the account : '.. name .. ' was added to console group !', root ) 
    end 
) 

* accName addAccountToConsole ( thePlayer, accountName ) 

* thePlayer = اللاعب الي يبي يضيف الحساب

* accountName = الحساب الي تبي تضيفه

* لازم تضيف المود لقروب الادمن

Edited by Guest
Link to comment
عادي تقدر انت تسوي الفنكشن
getPlayerConsole = function (  )  
--  
end 

ممكن تفهمني كيف؟

usefull funcition يعني ان تتصنع كود بنفسك مثل لمن تروح الام تي اي في خيار هناك اسمه كذا

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

ترا فاهم بس ابي افهم كيف اصنع الفنكشات

Link to comment
function setPlayerConsole ( Player ) 
      local acc = getAccountName((getPlayerAccount(Player)) 
           if isElement(Player) and getElementType(Player) == "player" then 
              local gr = aclGetGroup( "Console" ) 
                  aclGroupAddObject( "user."..acc , gr ) 
           end 
       return true 
end 
  

Player = اللاعب الي تبيه

:) ماني متأكد بس ان شاء الله تضبط الوظيفه

تعطي اللاعب كونسل

Link to comment
function setPlayerConsole ( Player ) 
      local acc = getAccountName((getPlayerAccount(Player)) 
           if isElement(Player) and getElementType(Player) == "player" then 
              local gr = aclGetGroup( "Console" ) 
                  aclGroupAddObject( "user."..acc , gr ) 
           end 
       return true 
end 
  

Player = اللاعب الي تبيه

ماني متأكد بس ان شاء الله تضبط الوظيفه

تعطي اللاعب كونسل

اتوقع ان هذا الرد يكفي

الوظيفه غير موجوده ,

بس تقدر تسويها , كـ مثال :

addAccountToConsole = function ( plr , name ) 
    if name and tostring ( name ) and plr and isElement ( plr ) and getElementType ( plr ) == 'player' then 
        local acc = getPlayerAccount ( plr ) 
            if not acc or isGuestAccount ( acc ) then return end 
                if isObjectInACLGroup ( 'user.'.. getAccountName ( acc ) , aclGetGroup ( 'Console' ) ) then 
                    if not isObjectInACLGroup ( 'user.'.. name , aclGetGroup ( 'Console' ) ) then 
                        aclGroupAddObject ( aclGetGroup( 'Console' ), 'user.' .. name ) 
            else 
                return false  
            end 
        else     
                return false  
            end 
    else 
            return false 
        end 
    return name or false 
end 
  
addCommandHandler ( 'add_', function ( plr , _, name ) 
    local name = addAccountToConsole ( plr, name ) 
        if not name then return false end 
            outputChatBox ( 'Warning ! the account : '.. name .. ' was added to console group !', root ) 
    end 
) 

* accName addAccountToConsole ( thePlayer, accountName ) 

* thePlayer = اللاعب الي يبي يضيف الحساب

* accountName = الحساب الي تبي تضيفه

* لازم تضيف المود لقروب الادمن

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