Azten Posted February 11, 2011 Share Posted February 11, 2011 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 Link to comment
Castillo Posted February 11, 2011 Share Posted February 11, 2011 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. Link to comment
Azten Posted February 11, 2011 Author Share Posted February 11, 2011 Lol this aint from the wiki its from a mode i downloaded from the community Link to comment
Castillo Posted February 11, 2011 Share Posted February 11, 2011 It's same, it's a public resource which doesn't do what you want. Link to comment
proracer Posted February 11, 2011 Share Posted February 11, 2011 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. Link to comment
Azten Posted February 11, 2011 Author Share Posted February 11, 2011 i cant find the way to add an acl group to that Link to comment
12p Posted February 11, 2011 Share Posted February 11, 2011 You can, what you meant is that you didn't find or you didn't tried to find. Why is so hard to use Wiki?! https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now