Jump to content

HOW CAN I CHANGE CERTAIN COLOURS OF TEXT


Deactivated Member

Recommended Posts

So I'm trying to do a Hit And Run Suspect callout, it's working fine. But I want to change the colour of "Dispatch:" in my Game.DisplayNotification("Dispatch: Suspect was in a severe hit and run a couple of hours ago, perform a traffic stop, and approach with caution."); to blue, I just don't know how to do it.

Link to comment
Share on other sites

Add a ~b~ before "Dispatch:" and ~s~ after that. How it should look like: Game.DisplayNotification("~b~Dispatch:~s~ Suspect was in a severe hit and run a couple of hours ago, perform a traffic stop, and approach with caution.");

 

Color codes:

~r~ = Red

~b~ = Blue

~g~ = Green

~y~ = Yellow

~p~ = Purple

~q~ = Pink

~o~ = Orange

~c~ = Grey

~m~ = Darker Grey

~u~ = Black

~n~ = New Line

~s~ = Default White

~w~ = White

~h~ = Bold Text

Edited by creator2013
Link to comment
Share on other sites

30 minutes ago, creator2013 said:

Add a ~b~ before "Dispatch:" and ~s~ after that. How it should look like: Game.DisplayNotification("~b~Dispatch:~s~ Suspect was in a severe hit and run a couple of hours ago, perform a traffic stop, and approach with caution.");

 

Color codes:

~r~ = Red

~b~ = Blue

~g~ = Green

~y~ = Yellow

~p~ = Purple

~q~ = Pink

~o~ = Orange

~c~ = Grey

~m~ = Darker Grey

~u~ = Black

~n~ = New Line

~s~ = Default White

~w~ = White

~h~ = Bold Text

Thanks a lot Sir, do I put a ~s~ for every colour? or is it different for some?

Link to comment
Share on other sites

  • 2 years later...

Is it a callout?

 

If not, put this:

while (true){
 GameFiber.Yield()
 if (Game.LocalPlayer.Character.DistanceTo(Suspect.Position) < 30f){
   Game.DisplayNotification("put text in here");
   break;
  }
}

 

if it is, put this in Process():

 

if (!NotificationShowed && Game.LocalPlayer.Character.DistanceTo(Suspect.Position) < 30f)
{
  Game.DisplayNotification("text in here");
  NotificationShowed = true
}

 

And this at the start where you declare variables:

 

private bool NotificationDisplayed = false;

 

Edited by LSPD Snow
Forgot semicolon

 

A LSPDFR lover 😉

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