Bonsai Posted July 11, 2017 Posted July 11, 2017 Hey, is there a way to get the position of world models, meaning the objects of the defaut San Andreas map? In the Map editor you can only select them, which automatically changes their position. I want to recreate them with new objects on their original position. Bonsai
Shayan816 Posted July 11, 2017 Posted July 11, 2017 maybe try to go in gta san andreas/data/maps and open with notepad.. this maybe ?
Discord Moderators Pirulax Posted July 11, 2017 Discord Moderators Posted July 11, 2017 Or just creating a simple script local posTable = {} function replaceAllWorldModels() for k,v in ipairs(getElementsByType("objects")) do --gets alll the object elemnts in the gta world local rotx,roty,rotz = getElementRotation(v) -- gets the rotation local posTable[v] = {Vector3(getElementPosition(v)),getElementModel(v),rotx,roty,rotz} -- stores the position, and such thing in a table with key of the element. removeWorldModel(getElementModel(v),1000,posTable[v][1]) -- removes the world object end for k,v in ipairs(posTable) do createObject(v[2],v[1],v[3],v[4],v[5]) -- This creates the object. end end should work fine.. but still cant understand why the hell u want to replace all the objects..this is laggy btw..
Gordon_G Posted July 11, 2017 Posted July 11, 2017 (edited) @Pirulax good try but it'll never work. getElementsByType("object") and not getElementByType("objects") will only return objects created from createObject(). I don't think that kind of function exists, sorry. Edited July 11, 2017 by Gordon_G 1
Bonsai Posted July 11, 2017 Author Posted July 11, 2017 I don't want to replace ALL the objects, only some to I can change their position. Often, a building etc. consists of many models, so I would have to manually adjust their position again, which would take very long. I will try checking that file, hopefully the models that belong together are next to each other there.
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