micheal1230 Posted December 2, 2012 Share Posted December 2, 2012 Why does'nt this work? Bear in mind im using this for custom mapped objects. addEventHandler( "onClientResourceStart", getRootElement( ), for i = 550, 20000 do engineSetModelLODDistance( i, 10000000 ) end ) Link to comment
uhm Posted December 2, 2012 Share Posted December 2, 2012 It may be because the distance parameter is too high and it trips its ass out (when it exceeds the bytes reserved for it, it becomes a negative value and then positive again and then negative, it's a shady area Example) Try using 300 in 10000000's stead, that seems to be pretty acceptable: For low LOD elements, engineSetModelLODDistance still has a limit of 300 units, but the actual draw distance used is 5 times the setting value. Also, low LOD elements ignore the 'Video' tab draw distance slider. So a setting of 200 will mean a low LOD element will always have a draw distance of 1000 units. Link to comment
micheal1230 Posted December 2, 2012 Author Share Posted December 2, 2012 It may be because the distance parameter is too high and it trips its ass out (when it exceeds the bytes reserved for it, it becomes a negative value and then positive again and then negative, it's a shady area Example)Try using 300 in 10000000's stead, that seems to be pretty acceptable: For low LOD elements, engineSetModelLODDistance still has a limit of 300 units, but the actual draw distance used is 5 times the setting value. Also, low LOD elements ignore the 'Video' tab draw distance slider. So a setting of 200 will mean a low LOD element will always have a draw distance of 1000 units. I get Loading script failed: showallshit\showallshit.lua:4:4 unexpected symbol near 'for' as a error Link to comment
Castillo Posted December 2, 2012 Share Posted December 2, 2012 You forgot about: function ( ) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for i = 550, 20000 do engineSetModelLODDistance ( i, 10000000 ) end end ) Link to comment
micheal1230 Posted December 2, 2012 Author Share Posted December 2, 2012 You forgot about: function ( ) addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) for i = 550, 20000 do engineSetModelLODDistance ( i, 10000000 ) end end ) Crashes my mta every time i start the script and join Link to comment
Rondawgb Posted December 2, 2012 Share Posted December 2, 2012 Could i be crashing because its trying to do this with too many objects at once ? Link to comment
uhm Posted December 2, 2012 Share Posted December 2, 2012 could be or because all those objects combined use too much RAM or processing power Link to comment
Rondawgb Posted December 2, 2012 Share Posted December 2, 2012 Then I think the way to would be to add all the objects you want to change the sight distance with into the script and only load the ones needed. 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