Jump to content

Bullet colshape


sacr1ficez

Recommended Posts

Posted

Hey, does something like "bullets" colshape exists in MTA? I'm asking because i have function which bypass players and i don't know how to make that this function will avoid bullets.

  • Moderators
Posted (edited)

There are two(three*) functions that can detect things between two points, which you could describe as "line detection". A line would be similar to a flying bullet.

 

https://wiki.multitheftauto.com/wiki/IsLineOfSightClear

 

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

 

* Water detection.

 

 

Edited by IIYAMA
  • Like 1

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

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
21 hours ago, IIYAMA said:

There are two(three*) functions that can detect things between two points, which you could describe as "line detection". A line would be similar to a flying bullet.

 

https://wiki.multitheftauto.com/wiki/IsLineOfSightClear

 

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

 

* Water detection.

 

 

 

So it's the only way to detect bullets?

  • Moderators
Posted (edited)

If we are talking about custom bullets, then yes.

 

For regular bullets use:

https://wiki.multitheftauto.com/wiki/OnClientPlayerWeaponFire

@majqq

Edited by IIYAMA
  • Like 1

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

 

  Useful functions  3x 

  Tutorials  4x 

 

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