HeK Posted October 28, 2012 Share 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 Link to comment
HeK Posted October 28, 2012 Author Share 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. Link to comment
Kenix Posted October 28, 2012 Share Posted October 28, 2012 (edited) Try to change radius more like 99999 Edited October 28, 2012 by Guest Link to comment
DakiLLa Posted October 28, 2012 Share 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) Link to comment
HeK Posted October 28, 2012 Author Share 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: Link to comment
Anderl Posted October 28, 2012 Share Posted October 28, 2012 You didn't change radius as Kenix said. Link to comment
HeK Posted October 28, 2012 Author Share Posted October 28, 2012 Still doesn't work, and i even used a radius of 100000000. Link to comment
Anderl Posted October 28, 2012 Share 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? Link to comment
HeK Posted October 28, 2012 Author Share Posted October 28, 2012 Doesn't show anything about the removemodel script. Link to comment
Dev Posted October 29, 2012 Share Posted October 29, 2012 Are you sure that the x, y, z positions are correct? Double check them by setElementPosition'ing yourself there. Link to comment
igthomas Posted October 29, 2012 Share 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 Link to comment
HeK Posted October 29, 2012 Author Share Posted October 29, 2012 Problem fixed, thanks igthomas. Link to comment
Baseplate Posted October 31, 2012 Share 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 Link to comment
igthomas Posted October 31, 2012 Share 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 Link to comment
myonlake Posted October 31, 2012 Share 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. Link to comment
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