dutchipoo 0 Posted January 21 Share Posted January 21 Writing a small "person with a knife" call out. Trying to make it to where onStart the ped has his HANDS UP, however whenever the player is within around 6ft of the ped, I want the ped to attack...This is the code I'm trying to use so far: public override void OnStart(Ped player) { base.OnStart(player); suspect.Weapons.Give(WeaponHash.Dagger, 1, false, true); if (Game.Player.Character.Position.DistanceTo(suspect.Position) < 5f) { suspect.Task.FightAgainst(player); } } Quote Link to post Share on other sites
Management Team NorthCam18 311 Posted January 24 Management Team Share Posted January 24 This looks like it would work, does nothing occur when you get close to the spawned ped? 1 Quote NorthCam18 OPERATIONS DIRECTOR GitHub Account | northcam@gtapolicemods.com Link to post Share on other sites
dutchipoo 0 Posted February 14 Author Share Posted February 14 It was correct, and thank you for confirming that. I just had to have a tick continuously do a check! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.