Jump to content

[HELP] redo coordinates


PerfX

Recommended Posts

Posted
local objects = getElementsByType("object")
local offx = 0
local offy = 0
local offz = 800

for m,n in ipairs(objects) do
  local x,y,z = getElementPosition(n)
  setElementPosition(n, x+offx, y+offy, z+offz)
end

 

Posted
8 minutes ago, The_GTA said:
local objects = getElementsByType("object")
local offx = 0
local offy = 0
local offz = 800

for m,n in ipairs(objects) do
  local x,y,z = getElementPosition(n)
  setElementPosition(n, x+offx, y+offy, z+offz)
end

 

thx

 

But there is a problem, I have 3 folders and 3 different lua files, I put this code in each file, and it only downloads one part

Posted (edited)
3 minutes ago, PerfX said:

thx

 

But there is a problem, I have 3 folders and 3 different lua files, I put this code in each file, and it only downloads one part

You have to put this code into the last Lua file or create a new one. To make sure everything has loaded you can put it inside of a resource-start event handler. It depends on whether your code is running clientside or serverside.

Edited by The_GTA
Posted
8 minutes ago, The_GTA said:

You have to put this code into the last Lua file or create a new one.

I don't understand scripting, let me give you a link to the map, will you try to do it?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...