HoLsTeN Posted August 21, 2011 Share Posted August 21, 2011 hi all i need some help i want to add image in the scoreboard can any one give the Functions what i need or any code i mean like this Link to comment
H5N1 Posted August 21, 2011 Share Posted August 21, 2011 try setElementData (player, "pic", image) where image = guiCreateStaticImage (...). But I'm not sure, that will work. Link to comment
HoLsTeN Posted August 21, 2011 Author Share Posted August 21, 2011 OK thank you but what i need to add in the client side ? Link to comment
HoLsTeN Posted August 22, 2011 Author Share Posted August 22, 2011 up* can any one give a Example ? Link to comment
H5N1 Posted August 22, 2011 Share Posted August 22, 2011 Try to add it clientside. If it works, make something like this: server: triggerClientEvent ("onImageAddToScoreboard", getRootElement(), player, imagepath) client: function ... (player, imagepath) guiCreateStaticImage (..., path) setElementData (player, "pic", image) end addEvent ("onImageAddToScoreboard", true) addEventHandler ("onImageAddToScoreboard", getRootElement(), function) Server triggers event to ALL clients, and clients create image and then set it to the scoreboard. But im still not sure, that will work. Link to comment
HoLsTeN Posted August 22, 2011 Author Share Posted August 22, 2011 Try to add it clientside. If it works, make something like this: server: triggerClientEvent ("onImageAddToScoreboard", getRootElement(), player, imagepath) client: function ... (player, imagepath) guiCreateStaticImage (..., path) setElementData (player, "pic", image) end addEvent ("onImageAddToScoreboard", true) addEventHandler ("onImageAddToScoreboard", getRootElement(), function) Server triggers event to ALL clients, and clients create image and then set it to the scoreboard. But im still not sure, that will work. thx for try i try with your code but not work When i used /debugscript 3 no Eror Link to comment
SpUnKyMe Posted August 23, 2011 Share Posted August 23, 2011 Hmm not tested but should work, adds picture after player name open dxscoreboard_client.lua and go to line 701 make one free line there and add dxDrawImage( xPos, y+s(1), 15, 10, "picture.png", 180, 0, 0, cWhite, drawOverGUI ) will look like xPos = xPos + textLength end dxDrawImage( xPos, y+s(1), 15, 10, "picture.png", 180, 0, 0, cWhite, drawOverGUI ) else 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