Wei Posted March 22, 2012 Share Posted March 22, 2012 Doesn't work ;( exports.scoreboard:addScoreboardColumn('Group') function fGroupShow ( ) setElementData( source,"Group",aclGetGroup( source ) ) end addEventHandler( 'onPlayerLogin', root, fGroupShow ) Link to comment
Aibo Posted March 22, 2012 Share Posted March 22, 2012 because this is not how aclGetGroup works Link to comment
Wei Posted March 22, 2012 Author Share Posted March 22, 2012 because this is not how aclGetGroup works but idk how could i do that Link to comment
Castillo Posted March 22, 2012 Share Posted March 22, 2012 Lil toady's admin panel has a function to get account ACL groups, you could take a look at it. Link to comment
drk Posted March 22, 2012 Share Posted March 22, 2012 exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) addEventHandler ( "onPlayerLogin", root, function ( ) setElementData ( source, "Group", aclGroupGetName ( aclGetGroup ( "Admin" ) ) ) end ) ?? Link to comment
Wei Posted March 22, 2012 Author Share Posted March 22, 2012 exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) addEventHandler ( "onPlayerLogin", root, function ( ) setElementData ( source, "Group", aclGroupGetName ( aclGetGroup ( "Admin" ) ) ) end ) ?? Lol this says that anyone is admin for me because i have modyfied acl Link to comment
drk Posted March 22, 2012 Share Posted March 22, 2012 Sorry, my mistake exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) local group = "" addEventHandler ( "onPlayerLogin", root, function ( _, account ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Admin" ) ) ) then group = "Admin" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Console" ) ) ) then group = "Console" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "SuperModerator" ) ) ) then group = "Super Moderator" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Moderator" ) ) ) then group = "Moderator" end setElementData ( source, "Group", tostring ( group ) ) end ) idk if is any function to get group name... Link to comment
Wei Posted March 22, 2012 Author Share Posted March 22, 2012 Sorry, my mistake exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) local group = "" addEventHandler ( "onPlayerLogin", root, function ( _, account ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Admin" ) ) ) then group = "Admin" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Console" ) ) ) then group = "Console" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "SuperModerator" ) ) ) then group = "Super Moderator" elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Moderator" ) ) ) then group = "Moderator" end setElementData ( source, "Group", tostring ( group ) ) end ) idk if is any function to get group name... Now it doesn't show anything ... Link to comment
drk Posted March 22, 2012 Share Posted March 22, 2012 exports [ "scoreboard" ]:addScoreboardColumn ( "Group" ) local group = "" addEventHandler ( "onPlayerLogin", root, function ( _, account ) if ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Admin" ) ) ) then group = "Admin" setElementData ( source, "Group", tostring ( group ) ) elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Console" ) ) ) then group = "Console" setElementData ( source, "Group", tostring ( group ) ) elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "SuperModerator" ) ) ) then group = "Super Moderator" setElementData ( source, "Group", tostring ( group ) ) elseif ( isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( account ) ), aclGetGroup ( "Moderator" ) ) ) then group = "Moderator" setElementData ( source, "Group", tostring ( group ) ) end end ) Link to comment
Kenix Posted March 22, 2012 Share Posted March 22, 2012 exports [ 'scoreboard' ]:addScoreboardColumn ( 'Group' ) addEventHandler ( 'onPlayerLogin', root, function ( _, uAccount ) local sGroup = 'None' local sAccount = getAccountName ( uAccount ) if isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'Admin' ) ) then sGroup = 'Admin' elseif isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'Console' ) ) then sGroup = 'Console' elseif isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'SuperModerator' ) ) then sGroup = 'Super Moderator' elseif isObjectInACLGroup ( 'user.' .. sAccount, aclGetGroup ( 'Moderator' ) ) then sGroup = 'Moderator' end setElementData ( source, 'Group', sGroup ) end ) Link to comment
Wei Posted March 23, 2012 Author Share Posted March 23, 2012 <meta> <info author="blazy" description="sb group" version="1.0.0" type="script" /> <script src="asd.lua" type="server"/> </meta> Link to comment
BorderLine Posted March 23, 2012 Share Posted March 23, 2012 try using kenix's script then reconnect and login again. When resource start don show your group, try that Link to comment
Wei Posted March 23, 2012 Author Share Posted March 23, 2012 (edited) - Edited March 23, 2012 by Guest 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