Jump to content

removeElementData client side


Recommended Posts

Posted

Hey guys, my problem is, that I want to remove an element data in client side, and I don't know how to do that.

I know, that removeElementData is a server-side function, but I need an alternate option in client-side.

I tried this, but it didn't work:

setElementData(localPlayer, "job.lastMarker", nil) 
setElementData(localPlayer, "job.thMarker", nil) 

Any ideas to do this without calling the server?

  • Moderators
Posted

There is nothing wrong with this.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

I made it.

The problem was the 4th arg.

So the working code is:

setElementData(localPlayer, "job.lastMarker", nil, true) 
setElementData(localPlayer, "job.thMarker", nil, true) 

Posted
I made it.

The problem was the 4th arg.

So the working code is:

setElementData(localPlayer, "job.lastMarker", nil, true) 
setElementData(localPlayer, "job.thMarker", nil, true) 

the 4th argument is true by default, so you must have been doing something wrong before.

  • Moderators
Posted
Any ideas to do this without calling the server?

It must be false

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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