Yurigarga Posted July 12, 2018 Share Posted July 12, 2018 [/url] function scoreboardAddColumn( name, forElement, width, friendlyName, priority ) if type( name ) == "string" then width = tonumber( width ) or 70 friendlyName = friendlyName or name priority = tonumber( priority ) or getNextFreePrioritySlot( scoreboardGetColumnPriority( "name" ) ) fixPrioritySlot( priority ) forElement = iif( type( forElement ) == "userdata" and isElement( forElement ), forElement, getRootElement() ) if forElement == getRootElement() then if not (priority > MAX_PRIRORITY_SLOT or priority < 1) then ---45.dize for key, value in ipairs( scoreboardColumns ) do if name == value.name then return false end end table.insert( scoreboardColumns, { ["name"] = name, ["width"] = width, ["friendlyName"] = friendlyName, ["priority"] = priority } ) table.sort( scoreboardColumns, function ( a, b ) return a.priority < b.priority end ) if sourceResource then if not resourceColumns[sourceResource] then resourceColumns[sourceResource] = {} end table.insert ( resourceColumns[sourceResource], name ) end return triggerClientEvent( getRootElement(), "doScoreboardAddColumn", getRootElement(), name, width, friendlyName, priority, sourceResource ) end else return triggerClientEvent( forElement, "doScoreboardAddColumn", getRootElement(), name, width, friendlyName, priority, sourceResource ) end end return false end Link to comment
Addlibs Posted July 12, 2018 Share Posted July 12, 2018 Image doesn't work, and you haven't even bothered describing/explaining the issue a bit more, or what your desired outcome is. 1 Link to comment
Yurigarga Posted July 13, 2018 Author Share Posted July 13, 2018 (edited) 4 hours ago, MrTasty said: Image doesn't work, and you haven't even bothered describing/explaining the issue a bit more, or what your desired outcome is. Warning:dx_scoreboardexports.lua:45 setElementData Modifying players before on player Join can cause desynchrozation. This warning is bothering me.What should I do? Edited July 13, 2018 by Yurigarga Link to comment
Addlibs Posted July 13, 2018 Share Posted July 13, 2018 The snippet of the code you've sent does not include any setElementData that the error message mentions. 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