Jump to content

[Help] GPS


3B00DG4MER

Recommended Posts

Hi Guys today i was Editing On GPS Resource (included With MTA SA Resources)

i've added That Function to "Client.lua"

    function calculateRoute(tox, toy, toz) 

        local x,y,z = getElementPosition(getLocalPlayer())

        local path = server.calculatePathByCoords(x, y, z, tox, toy, toz)

        for i,node in ipairs(path) do

            createMarker(node.x, node.y, node.z, 'corona', 5, 50, 0, 255, 200)

            addLinePoint ( node.x, node.y )

       

        end

    end

if i Call The Shared Function into Another Resource:

exports[ "gps" ].calculateRoute(100,100,10 ) 

it's Debug

attempt to yield across metamethod\C-call boundary

Failed To Call 'gps:calculateRoute'

gps\until.lua:5:bad argument #1 to '_resume' (coroutine expected)

Link to comment

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...