Jump to content

Removing Object /doesn't work properly


Soldier666

Recommended Posts

Hi, I am trying to delete / remove object that's in server.

I do it like this -

  
function start() 
        removeWorldModel(968, 200, -1526.4375, 481.38281, 6.90625, 0) 
    removeWorldModel(966, 200, -1526.39062, 481.38281, 6.17969, 0) 
    removeWorldModel(10829, 200, -1523.2578125, 486.796875, 6.15625, 0) 
end 
addEventHandler("onResourceStart", getResourceRootElement(), start) 
  

And the thing is, when I first save it, the object deletes. BUT then when I relog in the server, its again back there.

If I restart this resource, than again they dissapear. And again, if I relog they are visible.

What's the reason?

Link to comment
function removeWorldModels() 
    removeWorldModel(968, 200, -1526.4375, 481.38281, 6.90625, 0) 
    removeWorldModel(966, 200, -1526.39062, 481.38281, 6.17969, 0) 
    removeWorldModel(10829, 200, -1523.2578125, 486.796875, 6.15625, 0) 
end 
  
addEventHandler("onResourceStart", getRootElement(), removeWorldModels) 
addEventHandler("onPlayerJoin", getRootElement(), removeWorldModels) 

Link to comment
function removeWorldModels() 
    removeWorldModel(968, 200, -1526.4375, 481.38281, 6.90625, 0) 
    removeWorldModel(966, 200, -1526.39062, 481.38281, 6.17969, 0) 
    removeWorldModel(10829, 200, -1523.2578125, 486.796875, 6.15625, 0) 
end 
  
addEventHandler("onResourceStart", getRootElement(), removeWorldModels) 
addEventHandler("onPlayerJoin", getRootElement(), removeWorldModels) 

Thank you. Works. !

You helped me a lot.

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