Jump to content

[HELP] Problem removing world model


HeK

Recommended Posts

Posted (edited)
addEventHandler ("onResourceStart", getRootElement (), 
 function() 
    removeWorldModel(16613, 10, -346.671875, 1595.078125, 79.6640625) --object 
    removeWorldModel(16614, 10, -346.671875, 1595.078125, 79.6640625) --LOD 
end) 

It doesn't remove the object in the map.

Edited by Guest

Zero is a number too.

Posted

I changed radius to 100, and still doesn't work, what am i doing wrong? Script is running, but the object is there.

Zero is a number too.

Posted

I was having issues with removeWorldModel too some time ago, so I moved it to client-side (instead of server-side) and eveything worked fine.

addEventHandler ("onClientResourceStart", resourceRoot, 
 function() 
    removeWorldModel(16613, 10, -346.671875, 1595.078125, 79.6640625) --object 
    removeWorldModel(16614, 10, -346.671875, 1595.078125, 79.6640625) --LOD 
end) 

Posted

I tried it and it didn't work, the model is still there.

CODE:

addEventHandler ("onClientResourceStart", resourceRoot, 
 function() 
    removeWorldModel(16613, 10, -346.671875, 1595.078125, 79.6640625) --object 
    removeWorldModel(16614, 10, -346.671875, 1595.078125, 79.6640625) --LOD 
end) 

META:

  

Zero is a number too.

Posted

You didn't change radius as Kenix said.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

Well, there must be some wrong argument on the function or it's throwing some error and you didn't see.

Do you see any errors in console? Can you see any errors on a "mini-window" that is showed when you type /debugscript 3 on chat?

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

Are you sure that the x, y, z positions are correct? Double check them by setElementPosition'ing yourself there.

"First they ignore you, then they laugh at you, then they fight you, then you win."

- Mahatma Gandhi (1869-1948)

Posted (edited)

Try

Code

  
removeWorldModel(16613, 200, -346.671875, 1595.078125, 79.6640625) --object 
removeWorldModel(16614, 200, -346.671875, 1595.078125, 79.6640625) --LOD 
  

Meta

    
 
      
    

I had same problem, if you use it client side then you shouldn't use eventhandler and function just removeWorldModel

Edited by Guest
Posted

No I tried it already, for some reason if it works for you in server side that means it won't work for some other people. I guess it's a MTA bug so better make it client side and just place removeWorldModel without any functions or events. Correct if I'm wrong but that's what I realised

Posted

Well, good you noticed, but at least the Wiki suggests to use it server-side rather than client-side (http://puu.sh/1kSvK).

Also, the fact why it didn't work is most likely because you had an event on it. You do not need an event when using such functions.

If I helped you, please click the like button on the right ;) Thanks!

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