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
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.
Kenix Posted October 28, 2012 Posted October 28, 2012 (edited) Try to change radius more like 99999 Edited October 28, 2012 by Guest
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:
HeK Posted October 28, 2012 Author Posted October 28, 2012 Still doesn't work, and i even used a radius of 100000000.
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?
HeK Posted October 28, 2012 Author Posted October 28, 2012 Doesn't show anything about the removemodel script.
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.
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
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.
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