KoujiCM Posted December 2, 2013 Share Posted December 2, 2013 Hello I would like to create list a of players,and wanted to do when player is in acl admin and smod his name appears in a different color than the others in the list function createPlayerList ( ) local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) guiGridListSetItemColor ( playerList, row, column, 255,0,0 ) end end end addEventHandler ( "onClientResourceStart", resourceRoot, createPlayerList ) Link to comment
Castillo Posted December 2, 2013 Share Posted December 2, 2013 You could either get the players server side and then send them to the client side to add them to the grid list, or you could set element data on each player, which would be the ACL the player is part of. Link to comment
Thorxx Posted December 2, 2013 Share Posted December 2, 2013 if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then outputChatBox("Player is in ACL Admin") end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then outputChatBox("Player is in ACL SuperModerator") end Now it's your turn 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