eoLShady Posted September 6, 2020 Share Posted September 6, 2020 call(getResourceFromName("scoreboard"),"scoreboardAddColumn","Rank",1,110) function setRank() for _,player in ipairs(getElementsByType("player")) do if isGuestAccount(getPlayerAccount(player)) then setElementData(player,"Rank","Guest") elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then setElementData(player,"Rank","Admin") elseif isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Everyone")) then setElementData(player,"Rank","Member") end end end setTimer(setRank,500,0) ---- I want a color on the scoreboard. for example : Rank : #aa0000Admin Helpme! Link to comment
AfuSensi Posted September 9, 2020 Share Posted September 9, 2020 I might be wrong but doesnt adding the color code render the color in the scoreboard? If so, just replace Admin with #aa0000Admin Just a tip though, this does not need to be on a timer. You can use event such as onPlayerLogin , onPlayerLogout and onPlayerJoin to set a player's Rank. This will prevent your server from running the same checks every 500 ms while also keeping it updated. Link to comment
eoLShady Posted September 10, 2020 Author Share Posted September 10, 2020 On 9/9/2020 at 6:21 PM, AfuSensi said: I might be wrong but doesnt adding the color code render the color in the scoreboard? If so, just replace Admin with #aa0000Admin # aa0000 Admin I'm Typing There is no color on the scoreboard,only # aa0000 he is writing. @AfuSensi Link to comment
AfuSensi Posted September 11, 2020 Share Posted September 11, 2020 Did you put # aa0000 or #aa0000? It should not include a space. Link to comment
Tekken Posted September 11, 2020 Share Posted September 11, 2020 I am pretty sure there’s a setting in meta.xml for allowing color codes Link to comment
eoLShady Posted September 11, 2020 Author Share Posted September 11, 2020 What exactly should I write? Can you help me?and will I write it to the scoreboard or meta.xml of the rank system? which. @Tekken 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