[Release] Compass and street name HUD

This mod will add a compass and street name display to your HUD. The compass is customizable and the street name display also properly shows names for intersections (although sometimes it may overlap with the freeway for example).

This was inspired by Mr.Scammer’s Street Name Display V2.

I didn’t test any configuration other than what is default, so you’ll have to experiment and see what works best for you. I made the configuration part just for you guys, I hope you like it.

As per usual, no credits required. You are free to alter and re-publish, or copy bits of it to use in your own project. Shoutouts are always appreciated, though.

DOWNLOAD .ZIP
DOWNLOAD .ZIP

-or-

GET FILES FROM PROJECT PAGE (Gitlab)

-or-

__resource.lua __resource.lua - Pastebin.com
essentials.lua essentials.lua - Pastebin.com
compass.lua compass.lua - Pastebin.com
streetname.lua streetname.lua - Pastebin.com

Configuration options worth mentioning

compass.fov = 180 - The amount of degrees to be visible on the compass.

compass.followGameplayCam = true - When true, compass will point to wherever the camera is pointing to. When false, compass will point to whatever the player’s heading is.

compass.ticksBetweenCardinals = 9.0 - The amount of ticks between cardinals. 9.0 is 1/10th of 90°. This value should always be a division of 90° as well as 45° (ie. 4.5, 9.0, 22.5, etc).

31 Likes

That looks great! Thanks for your contribution!

Looks lovely!

   

can we move the street names position ?

Yes, change this. streetName.position = {x = 0.5, y = 0.02, centered = true}

Looks great. Loving the whole interactive compass you’ve made.

This was an awesome pickup, I’ve been using the old PLD for quite a while and it will be nice to switch it up. Thanks!

Looks nice, I am fairly new to this. Is this a client or server side mod and Whats the install instructions?

1 Like

It is server side. Just put it in your resources folder

I want to thank you for this Script, really. Apreciate It and nice work :slight_smile:

I have a question too : Can we change the Streets names Font and put it like the original one (in the bottom right) ?

Thanks for the help

You could but I haven’t made the configuration options for that. If you know a little bit of LUA, you could try to edit the file yourself to get the desired effect. To change the font, find the following in streetname.lua and add font = 1, to the list. Default font is “0” but you can also try “2” etc…

        drawText( table.concat( street, " & " ), streetName.position.x, streetName.position.y, {
            size = streetName.textSize,
            colour = streetName.textColour,
            outline = true,
            centered = streetName.position.centered
        })

Here are the other options:

font = <integer> default: 0
scale = <float> default: 1.0
colour = {
	r = <integer> default: 255,
	g = <integer> default: 255,
	b = <integer> default: 255,
	a = <integer> default: 255
}
shadow = {
	distance = <integer> default: 0,
	r = <integer> default: 0,
	g = <integer> default: 0,
	b = <integer> default: 0,
	a = <integer> default: 255
}
border = {
	size = <integer> default: 1,
	r = <integer> default: 0,
	g = <integer> default: 0,
	b = <integer> default: 0,
	a = <integer> default: 255
}
centered = <bool> default: false
outline = <bool> default: false
1 Like

Thanks, found it and change it :slight_smile:

Was the font number 1 :slight_smile: (Better up the font size too with this font)

Scapin

Hi
What line did you put “font = 1” ?
Because I tried and it doesn’t work for me

Thanks

Only to change the font. Don’t touch at this if you don’t need :slight_smile:

@Scapin Hmm, dosent work for me, do you mind uploading your streetname.lua for us?

1 Like

Here it is :

streetname.lua (1.4 KB)

2 Likes

Thank you very much! :blush:

1 Like

any chance an uploaded link can be provided

1 Like

I am completely lost here…

So with the resource, essentials, compass and streetname luas. Where do they go?

I have tried to create a folder and put them in resources and did start (folder) name and nothing comes up.

I want the compass that shows with the streets in it, but I can’t seem to figure this one out.

Does this work on fxserver?