Seba500PLK Posted August 15, 2014 Share Posted August 15, 2014 hi, I can do that showed the players offline? --Server function getgroup (player) 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 ( "BazaAdminow" ) ) then if (admins == "") then admins = getAccountName (getPlayerAccount(v)) else admins = admins .. ", " .. getAccountName (getPlayerAccount(v)) end end end end outputChatBox( "Base Own:", player, 255, 255, 0) outputChatBox( " " .. tostring ( admins ), player, 255, 255, 0) end addCommandHandler ("gettest", getgroup) Link to comment
Seba500PLK Posted August 15, 2014 Author Share Posted August 15, 2014 it can be done? Link to comment
Seba500PLK Posted August 15, 2014 Author Share Posted August 15, 2014 I have no idea how to connect with each other. When you insert getAccounts () is the amount of accounts is shown, and I'm talking about the names in the group Link to comment
Et-win Posted August 15, 2014 Share Posted August 15, 2014 --And: getAccountPlayer And: When you insert getAccounts () is the amount of accounts is shown Go read Wiki immediately now before saying something that isn't true...... Link to comment
Seba500PLK Posted August 15, 2014 Author Share Posted August 15, 2014 [2014-08-15 22:28:33] ERROR: [DayZ-MTA]/infopanel/infos.lua:6: bad argument #1 to 'ipairs' (table expected, got boolean) [2014-08-15 22:28:33] WARNING: [DayZ-MTA]/infopanel/infos.lua:4: Bad argument @ 'getElementsByType' [Expected string at argument 1, got table] [2014-08-15 22:28:33] WARNING: [DayZ-MTA]/infopanel/infos.lua:3: Bad argument @ 'getAccountPlayer' [Expected account at argument 1, got trying to figure something out, but I do not it goes function getgroup (player ) local thePlayer = getAccountPlayer ( getAccounts () ) players = getElementsByType ( thePlayer ) 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 ( "BazaAdminow" ) ) then if (admins == "") then admins = getAccountName (getPlayerAccount(v)) else admins = admins .. ", " .. getAccountName (getPlayerAccount(v)) end end end end outputChatBox( "Base Owns:", player, 255, 255, 0) outputChatBox( " " .. tostring ( admins ), player, 255, 255, 0) end addCommandHandler ("gettest", getgroup) Link to comment
Et-win Posted August 15, 2014 Share Posted August 15, 2014 ...You have no idea what you are doing, right? First get all accounts (getAccounts()) Then use a loop on that table. Then get the player who is using the account at that moment (getAccountPlayer()) If it is false it's not in use so you could call that offline, otherwise online. 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