Jump to content

When player dies - bodyguards shoot at player


Recommended Posts

What I've noticed is I can create the peds, they will follow me and I can spawn them to different locations etc.. When I die though, then I accidently shoot them they attack me. It's like they forgot I was the group leader.


So in ScriptHook C++ inside a update function I made sure I reassign the peds to the new group ID thinking perhaps when the player dies the PLAYER::PLAYER_PED_ID() changes as well.


Also the PED::SET_PED_NEVER_LEAVES_GROUP is set as well.


Any insight?

Link to comment
Share on other sites


Only thing I can think of is that that group (Player group) doesn't exist when the player is dead. I would delete the guards and spawn new ones after revival, being sure to re-assign them to the group.

Link to comment
Share on other sites

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.