Drakath Posted January 10, 2014 Share Posted January 10, 2014 Does 'getPedTargetCollision' work with fists? I tried to use it for my zombies but it returned boolean. Link to comment
Drakath Posted January 10, 2014 Author Share Posted January 10, 2014 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? Link to comment
xXMADEXx Posted January 10, 2014 Share Posted January 10, 2014 Use: if sx and sy and sz then ... code .... end Link to comment
DNL291 Posted January 10, 2014 Share Posted January 10, 2014 get already is a MTA function. https://wiki.multitheftauto.com/wiki/Get Link to comment
Moderators IIYAMA Posted January 10, 2014 Moderators Share Posted January 10, 2014 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) Link to comment
DNL291 Posted January 11, 2014 Share Posted January 11, 2014 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". Link to comment
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