Jump to content

Refreshing Class on Custom Scoreboard


Recommended Posts

I made a custom scoreboard, and I have set element data's but I am trying to refresh it on my scoreboard, because if player changes class then it should change on scoreboard -

I get no errors -

Client Side

function refresh() 
data = getElementData(getLocalPlayer(), "Class") 
end 
setTimer ( refresh, 51, 0 ) 
  
dxDrawText(data, classx, y+i*20.5) 
  

It's frozen as the previous class and doesnt change

Link to comment
I dont need client renders,

I wanted to know if that was the right way to refresh the element data, I have my renders already.

You didn't got me, instead of refreshing the data by a timer you can just replace data variable with "getElementData(getLocalPlayer(), "Class")" in your event.

onClientRender event is already like a timer that update enywhere from 25-100 (depends of how many fps you have) times a second.

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...