Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Make ped face player when near them and set ped as cop

Featured Replies

How would you go about making a ped face the player when near them. Right now I am just using something like this:

if (Game.LocalPlayer.Character.DistanceTo(witness.Position) < 30f)
   {
      witness.Face(Game.LocalPlayer.Character.Position);
   }

But this makes them spin on a dime and looks very unnatural. What's the best way to achieve this? 

 

One other question, do you have to explicitly set a cop model as a cop? I have a panic button type callout that spawns s_m_y_cop_01 but sometimes the cop will shoot at the player and the player can arrest the cop. I have the cop and the player in the same relationship group.

Edited by Leroy100

6 hours ago, Leroy100 said:

How would you go about making a ped face the player when near them. Right now I am just using something like this:


if (Game.LocalPlayer.Character.DistanceTo(witness.Position) < 30f)
   {
      witness.Face(Game.LocalPlayer.Character.Position);
   }

But this makes them spin on a dime and looks very unnatural. What's the best way to achieve this?

Rage.Native.NativeFunction.Natives.TASK_TURN_PED_TO_FACE_ENTITY(Ped, Game.LocalPlayer.Character, -1);

https://nativedb.dotindustries.dev/natives?search=TASK_TURN_PED_TO_FACE_ENTITY

 

6 hours ago, Leroy100 said:

One other question, do you have to explicitly set a cop model as a cop? I have a panic button type callout that spawns s_m_y_cop_01 but sometimes the cop will shoot at the player and the player can arrest the cop. I have the cop and the player in the same relationship group.

 

Functions.SetPedAsCop(ped);

Released plugins

Rich's Police EnhancementsScene Manager | Rich Ambiance

Retired?

  • The title was changed to [SOLVED] Make ped face player when near them and set ped as cop

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Similar Content

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.