Jump to content

» «

[.NET]Anyway to detect wall impact?

1 reply to this topic
  • Cloud_Power

    Player Hater

  • Members
  • Joined: 12 Jul 2016
  • Italy


Posted A week ago Edited by Cloud_Power, A week ago.

Hello guys!

So, I have this snippet of code

     foreach (Entity entity in World.GetNearbyEntities(Game.Player.Character.Position, 5.0f))
          if (Function.Call<bool>(Hash.IS_ENTITY_A_PED, entity) == false)

which is working just fine as long as I don't crash against a wall!

It correctly detect other entities, such as vehicles and objects, but not wall!


How can I detect if I've crashed against a wall?


Thank you! :)

  • meimeiriver likes this

  • meimeiriver

    Player Hater

  • Members
  • Joined: 3 weeks ago
  • Netherlands


Posted 6 days ago Edited by meimeiriver, 6 days ago.

Kinda new to all this stuff myself, but I have a smilar script, and just do:


if (Game.Player.Character.HasCollidedWithAnything) {


​Which seems to work just fine.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users