Jump to content

Hitting an object


AMARANT

Recommended Posts

Posted

Hello there. Is there a function or some other way to check hitting or punching an object? For example, I want to check if I hit a specific box with my hands. Thanks in advance for answers.

Posted (edited)

I don't think you can check for hand contact with elements in MTA, if there is, it's too hard for a beginner ( unless you already have a good base in maths and even so you would need lil LUA knowledge ).

Edited by Guest
Posted

I noticed this new function recently. I don't use 1.4 MTA version yet, so I wonder if that function might be a solution of my problem? Has anybody checked it?

  • Moderators
Posted

There are some possibility's, but they aren't just one function.

https://wiki.multitheftauto.com/wiki/GetPedBonePosition

This means you can pick some positions of the human body.

https://wiki.multitheftauto.com/wiki/ProcessLineOfSight

processLineOfSight(startX,startY,startZ,endX,endY,endZ,true,true,true,true,true,false,false,false,ignorePlayer)) 

IgnorePlayer must be you,

https://wiki.multitheftauto.com/wiki/OnClientRender

Use onClientRender to check those data.

This is a possibility, good luck.

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