Jump to content

addScoreboardColumn


HoLsTeN

Recommended Posts

hi all can any one help me here -_-"

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 
function() 
  exports.scoreboard:addScoreboardColumn("EXP") 
end) 
      
function xxx() 
  if source and getElementType(source) == "player" then 
    local FFF = getElementData(source,"EXP") 
    setElementData(source, "EXP", FFF) 
  end 
end 
addEventHandler("onPlayerSpawn", getRootElement(), xxx) 

it is addScoreboardColumn But No EXP

Link to comment

did you try this?

why you need to check if source is player or not ! the event is onPlayerSpawn so what is Spawned is Player!

also why you get same data and set same data!!

addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), 
function() 
      exports.scoreboard:addScoreboardColumn("EXP") 
end) 
          
function xxx() 
local FFF = getElementData(source,"EXP") 
    setElementData(source, "EXP", FFF) 
end 
addEventHandler("onPlayerSpawn", getRootElement(), xxx) 

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...