Jump to content

Game DisplayHelp


JordanIT21

Recommended Posts

where do i run this code?

 

 if (Suspect.DistanceTo(Game.LocalPlayer.Character.Position) < 5)
            {
                Game.DisplayHelp("Press ~y~Y~w~ to speak to the suspect | Press ~r~U~w~ to end the callout", false);
            }

 

Edited by JordanIT21
Link to comment
Share on other sites

2 minutes ago, Rich said:

Are you running it in a loop?

 

Heres a snippet of the code
 

Spoiler
public override void Process()
        {

            base.Process();

            var animSet = new AnimationSet("move_m@drunk@verydrunk");
            animSet.LoadAndWait();
            Suspect.MovementAnimationSet = animSet;
           
            if(Suspect.DistanceTo(Game.LocalPlayer.Character.Position) < 5)
            {
                Game.DisplayHelp("Press ~y~Y~w~ to speak to the suspect | Press ~r~U~w~ to end the callout", false);
            }

            if (Game.LocalPlayer.Character.DistanceTo(Suspect.Position) < 5)
            {
                Suspect.Face(Game.LocalPlayer.Character.Position);
            }
            if (Game.LocalPlayer.Character.DistanceTo(Suspect) <= 4f)
            {

                SearchArea.Alpha = 0.0f;
                SearchArea.Scale = 0f;

                Suspect.KeepTasks = false;
                Suspect.Tasks.Clear();
                Suspect.BlockPermanentEvents = true;
                SearchArea.IsRouteEnabled = false;

                if (Game.IsKeyDown(Handler.TalkKey))
                {
                    SuspectBlip = Suspect.AttachBlip();
                    SuspectBlip.Color = System.Drawing.Color.Red;
                    SuspectBlip.IsRouteEnabled = false;
                    SuspectBlip.Scale = 1.0f;

                    Suspect.KeepTasks = false;
                    Suspect.Tasks.Clear();

                    Suspect.BlockPermanentEvents = true;
                    counter++;

 

 

Link to comment
Share on other sites

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

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...