Jump to content

How can I make subtitle text vary?


OfficerBL09

Recommended Posts


How can I make my subtitles vary? For example one time I have, "No, thanks.", and another time I have, "Sure, cya!" In the same callout? I've tried using            

 

 Game.DisplaySubtitle("~g~You~w~: Hey buddy, you know what you've done. Leave before I have to kick you out by force."); || Game.DisplaySubtitle("Example.");

 

but it doesn't work. I'm also kind of a beginner so don't lash out on me. Here is part of my code.

 

Spoiler

     public override void Process()
        {
            base.Process();

            Rage.Native.NativeFunction.Natives.TASK_TURN_PED_TO_FACE_ENTITY(Suspect, Game.LocalPlayer.Character, -1);
            if (Game.LocalPlayer.Character.DistanceTo(Suspect) <= 5f)
            {
                Game.DisplayHelp("Press ~y~'Y'~w~ To Talk To The Suspect", false);

                if (Game.IsKeyDown(System.Windows.Forms.Keys.Y))
                {
                    counter++;

                    if (counter == 1)
                    {
                        Game.DisplaySubtitle("~g~You~w~: Hey buddy, you know what you've done. Leave before I have to kick you out by force.");
                    }
                    if (counter == 2)
                    {
                        Game.DisplaySubtitle("~r~Suspect~w~: Hey fellow, what brings you down here? I ain't been doing nun'.");
                    }
                    if (counter == 3)
                    {
                        Game.DisplaySubtitle("~g~You~w~: Hey, I'm gonna tell you one more time. Leave, or I'll have to kick you out by force.");
                    }
                    if (counter == 4)
                    {
                        Game.DisplaySubtitle("~r~Suspect~w~: This sum' bullcrap, I ain't movin' a single muscle.");
                        Game.DisplayNotification("3dtextures", "mpgroundlogo_cops", "Park Callouts v0.1.0", "~r~Public Disturbance~w~", "Detain the ~r~Suspect~w~ and lead him off of the premises.");
                    }
                    if (counter == 5)
                    {

                    }
                }
            }

 

I make vehicle textures, and make various LSPDFR videos and tutorials on my youtube!

Link to comment
Share on other sites

No, so basically the callout fully works. That's only part of the code. I'm trying to get it so its not the same reply every time, otherwise the callout will be too plain and boring. I'm asking how I can do that.

I make vehicle textures, and make various LSPDFR videos and tutorials on my youtube!

Link to comment
Share on other sites

3 minutes ago, Rich said:

Which reply is displaying?  Is your counter working as expected?

Everything displayed in the code is working. Yes, my counter is working as expected. Just take for example the last message, "This sum' bullcrap, I ain't movin' a single muscle.", what if I wanted the suspect to sometimes reply with that or sometimes reply with something like, "Sure thing officer!". Just so it isn't the same thing every time. Basically like sometimes the suspect is compliant and sometimes non-compliant, just to add more realism to the callout.

I make vehicle textures, and make various LSPDFR videos and tutorials on my youtube!

Link to comment
Share on other sites

1 minute ago, Rich said:

Oh, I misunderstood.  Simple solution is to make a collection of responses and choose one at random.

If you don't mind can you give me a brief explanation of how to do that?

I make vehicle textures, and make various LSPDFR videos and tutorials on my youtube!

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