HeK Posted October 28, 2012 Posted October 28, 2012 (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 October 28, 2012 by Guest Zero is a number too.
Kenix Posted October 28, 2012 Posted October 28, 2012 Radius should be larger. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
HeK Posted October 28, 2012 Author Posted October 28, 2012 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.
Kenix Posted October 28, 2012 Posted October 28, 2012 (edited) Try to change radius more like 99999 Edited October 28, 2012 by Guest http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
DakiLLa Posted October 28, 2012 Posted October 28, 2012 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)
HeK Posted October 28, 2012 Author Posted October 28, 2012 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.
Anderl Posted October 28, 2012 Posted October 28, 2012 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
HeK Posted October 28, 2012 Author Posted October 28, 2012 Still doesn't work, and i even used a radius of 100000000. Zero is a number too.
Anderl Posted October 28, 2012 Posted October 28, 2012 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
HeK Posted October 28, 2012 Author Posted October 28, 2012 Doesn't show anything about the removemodel script. Zero is a number too.
Dev Posted October 29, 2012 Posted October 29, 2012 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)
igthomas Posted October 29, 2012 Posted October 29, 2012 (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 October 30, 2012 by Guest
HeK Posted October 29, 2012 Author Posted October 29, 2012 Problem fixed, thanks igthomas. Zero is a number too.
Baseplate Posted October 31, 2012 Posted October 31, 2012 Maybe fixed, but an explication, maybe when you changed to serversided script, you forgot to change the event onClientResourceStart to onResourceStart
igthomas Posted October 31, 2012 Posted October 31, 2012 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
myonlake Posted October 31, 2012 Posted October 31, 2012 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now