Jump to content

Need abit of help =)


Azten

Recommended Posts

Posted

but i need help in some thing thx norby for helping me with acl but now i need some thing for the acl its the (/admins) command i need it to say ex : Online admins : level 10

ex:[MXS]SmOkIn

level 9

ex [MXS]Tomba120 and etc

so can u help me il provide u with the code :

-- (/admins) 
local admins = "" 
  
function processAdminList() 
    players = getElementsByType ( "player" ) 
    admins = "" 
    for k,v in ipairs(players) do 
        local accountname = "" 
        if (isGuestAccount(getPlayerAccount(v)) == false) then 
            accountname = getAccountName (getPlayerAccount(v)) 
            if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then 
                if (admins == "") then 
                    admins = getPlayerName(v) 
                else 
                    admins = admins .. ", " .. getPlayerName(v) 
                end 
            end 
        end 
    end 
end 
  
addEventHandler( "onPlayerLogin", getRootElement(), processAdminList ) 
addEventHandler( "onPlayerLogout", getRootElement(), processAdminList ) 
addEventHandler( "onPlayerQuit", getRootElement(), processAdminList ) 
  
  
function setAdminList(Player,command) 
    if admins ~= "" then 
        outputChatBox("Online Admins: "..admins , Player, 255 , 255, 0) 
    else 
        outputChatBox("No admins online." , Player, 255 , 255, 0) 
    end 
end 
addCommandHandler("admins", setAdminList) 
  
--- !admins or !onlineadmins or !Admins 
 function tAdmins(message,messageType) 
 if message == "!admins" or message == "!Admins" or message =="!onlineadmins" then 
 local playeraccount = getPlayerAccount(source) 
    if admins ~= "" then 
        outputChatBox("Online Admins: "..admins , getRootElement(), 255 , 255, 0) 
    else 
        outputChatBox("No admins online." , getRootElement(), 255 , 255, 0) 
    end 
 end 
 end 
 addEventHandler("onPlayerChat",getRootElement(),tAdmins) 

plz help :):):)

Posted

I think this is a example from wiki, and you just want us to do the rest, that won't happend, start learning by yourself and post here when you get in trouble.

Posted
Lol this aint from the wiki its from a mode i downloaded from the community

Try something before than you can provide the code you wrote and we will try to correct your mistakes.

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