[Help] Generating Directions to coord

function Global.GenerateDirectionsToCoord(x, y, z, p3)
return _in(0xF90125F1F79ECDF8, x, y, z, p3, _f, _f, _f, _r, _ri)
end

I have tried the following thing, but i can’t get it to work.

direct = true
Citizen.CreateThread(function()
	while true do
		Wait(0)
          if direct ~= false then
             local b1, b2, b3 = table.unpack( GenerateDirectionsToCoord(200, 300, 22, true) )
             Citizen.trace(b1)
          end
	end
end)

iam getting this error

The goal is to get a Integer that stands for a direction.
I would love to know how to get this working in lua. Any help is appreciated <3

Please elaborate more on your post. What are you trying to do? Is this a script from a resource or your own? Rest of code as things may be dependant on things you have not said?

Please be more descriptive, the more you give the better others can help you…

I also recommend not naming topics “help”, “help please”, “coding help” etc. as it can put some people off from reading your topic. Name it something more as a 1-5 word summary of your issue Eg; [Help] Generating Directions to coord.

1 Like