Jump to content

getPedTargetCollision


Drakath

Recommended Posts

Posted

It works with fists. But I keep getting a nil value when I'm not near an obstacle.

function get() 
      local sx,sy,sz = getPedTargetCollision(localPlayer) 
 outputChatBox(sx..", "..sy) 
   end 
addEventHandler("onClientPreRender",getRootElement(),get) 

How can I fix it?

s.epicrow.com:22003.png

  • Moderators
Posted
get already is a MTA function.

https://wiki.multitheftauto.com/wiki/Get

True, but he will overwrite it.

Just like a wrapper, won't cause any serious problems afk.

But it should be prevented, the mta function will not be able to use in that script.(if it isn't redefined)

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

True, but he will overwrite it.

Just like a wrapper, won't cause any serious problems afk.

But it should be prevented, the mta function will not be able to use in that script.(if it isn't redefined)

Yes, i didn't said it would cause stack overflow, because it's not a clientside function.

That isn't what is causing the error, anyway. But as you said - "it should be prevented".

Please do not PM me with scripting related question nor support, use the forums instead.

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