GamerDeMTA Posted June 15, 2013 Share Posted June 15, 2013 -- FILE: mapEditorScriptingExtension_c.lua -- PURPOSE: Prevent the map editor feature set being limited by what MTA can load from a map file by adding a script file to maps -- VERSION: RemoveWorldObjects (v1) AutoLOD (v1) function requestLODsClient() triggerServerEvent("requestLODsClient", resourceRoot) end addEventHandler("onClientResourceStart", resourceRoot, requestLODsClient) function setLODsClient(lodTbl) for i, model in ipairs(lodTbl) do engineSetModelLODDistance(model, 300) end end addEvent("setLODsClient", true) addEventHandler("setLODsClient", resourceRoot, setLODsClient) Link to comment
PaiN^ Posted June 15, 2013 Share Posted June 15, 2013 When the client side script starts, It will trigger a server side event ( if it's exists ) . When the event "setLODsClient" is triggerd, A table will be send as an argument ( The table contains models IDs ) then the table well be looped and every model in that table well have it LOD distance set to 300 . 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