dewu Posted April 24, 2015 Share Posted April 24, 2015 Hi guys. From few hour I'm thinkig and trying do add rank images for every player in scoreboard. I tried like that by getting image number from getElementData rank id, but it's not works: scoreboardColumns = { { name = "Nick", width = 200, data = function (element) return getPlayerName ( element ) end }, { name = "Murders", width = 100, data = function (element) return ( getElementData ( element, "murders" ) or 0 ).. "/"..( getElementData ( element, "totalmurders" ) or 0 ) end }, { name = "Zombies Killed", width = 80, data = function (element) return ( getElementData ( element, "zombieskilled" ) or 0 ).. "/"..( getElementData ( element, "totalzombieskilled" ) or 0 ) end }, { name = "Alive Time", width = 80, data = function (element) return formatTimeFromMinutes(getElementData ( element, "alivetime" ) or 1 ).."/"..formatTimeFromMinutes(getElementData ( element, "totalalivetime" ) or 1 ) end }, { name = "Group", width = 80, data = function (element) return getElementData ( element, "gang" ) or "None" end }, { name = "Rank", width = 80, data = function (element) return guiCreateStaticImage(0,0,0.4,0.4, 'images/ranks/'..getElementData(element,"rank")..'.png', true) or "Unranked" end }, } nothing is appear. @EDIT Sorry, now i see. Image is appear, but in left-top corner, not in scoreboard table. Why? Any ideas? Link to comment
vx89 Posted April 24, 2015 Share Posted April 24, 2015 Hello, guiCreateStaticImage is not a function that just creates an image, but it also draws it (using CEGUI that mta:sa uses). Looking at scoreboard's API (exported functions) there does not seem to be a standard way to add images without changing scoreboard resource itself. There might be a way to do it without modifying scoreboard resource, but it is not documented. 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