• Announcements

    • jhxp

      Forums are online again after a maintenance.   18/03/17

      MTA Forums maintenance is completed, although some automatic time-heavy tasks are still in process and will be finished eventually in background. Expect some features such as Forum Search to not display all results until all processes are finished. Please let us know if you spot a forum feature that worked correctly before the maintenance but does not work anymore now. Thanks. --MTA Team
Sign in to follow this  
Followers 0

Level Scoreboard

2 posts in this topic

Hello guys! I have problem with my script, anyone help?

Level Server

exports.scoreboard:addScoreboardColumn ( "Level", getRootElement(), 9, 0.07 ) 
function scoreLevel () 
local account = getPlayerAccount(source) 
local level = getElementData(source,"level") or 0 
if isGuestAccount ( account ) then 
setElementData(source, "level",":img/Guest.png") 
local test = ":img/"..tostring(level)..".png" 
setElementData(source, "level", test and {type = "image", src =  test, height = 12, width = 16} or "N/A") 
addEventHandler("onPlayerSpawn", getRootElement(), scoreLevel) 

Scoreboard Client

Debug: attempt to index global 'column' (a nil value)

elseif column.name == "Level" then  
dxDrawImage( topX+theX, y-s(0.5), 30, 30, content, 0, 0, 0, cWhite, drawOverGUI ) 


Edited by TorNix~|nR

Share this post

Link to post

First remove your code en Scoreboard Client then change level to Level en setElementData

Share this post

Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.