Speedlimits
Showcase
About
Speedlimits is a free and standalone script that shows lore-friendly speed limits on customizable nui signs. The script’s usage of vehicle nodes allows the speed limits to be much more accurate than other scripts. For example, it allows for multiple speed limits on the same street as well as advisory/recommended speed signs. Furthermore, you can add custom signs or use any of the signs that already come with the script (See Configuration).
*By default, the speed limits are based on in-game signs, NPC speeds, and the road’s real-life counterparts. (you can of course change them to whatever you like)
This resource was initially inspired by [FREE] On-Screen NUI Speedlimit Signs made by @amazonium.
Optimization
The script runs at 0.00ms when you’re not in a vehicle. It uses between 0.01ms to 0.03ms when it’s active.
Configuration
The script can be configured to your liking.
config.lua
Config = {}
-- Whether or not it is enabled by default (if false people have to use the /speedlimit command to enable it)
Config.Enabled = true
-- The type of sign and advisory sign to use (see the bottom of this file for a list of possible signs)
Config.SignType = 'us-standard'
Config.AdvisoryType = 'us-advisory' -- or false (no quotes) to disable
-- If set to true, only the driver of the vehicle will be able to see the speedlimit
Config.DriverOnly = false
-- If set to true, it will only display the speedlimit for x amount of time when it changes before it fades away
Config.DisplayOnlyOnChange = false
Config.ChangeDisplayTime = 3000 -- ms the speedlimit should be displayed after change if Config.DisplayOnlyOnChange is set to true
-- Speedlimits for certain areas. NOTE: Not every road draws it speed limit from these.
Config.Speedlimits = {
Default = 35,
DirtRoads = 35, -- Most, but not all dirt roads
PaletoBay = 35,
SandyShores = 35,
Freeway = 60
}
-- Localization for the notifications
Config.Localization = {
ShowSpeedlimit = "The speedlimit is now shown!",
HideSpeedlimit = "The speedlimit is now hidden!"
}
-- Blacklisted vehicle classes
--[[
13: Cycles
14: Boats
15: Helicopters
16: Planes
]]--
Config.BlacklistedClasses = {
[13] = true, [14] = true, [15] = true, [16] = true
}
--[[
List of possible signs.
Regular Speedlimit Signs:
us-standard
us-oregon
us-metric
canada-standard
canada-ontario
canada-yt-bc (Yukon and British Columbia)
germany
japan
united-kingdom
amber (Sweden, Finland, Iceland etc.)
australia
Advisory/Recomended Speedlimit Signs:
us-advisory
eu-advisory
sweden-advisory
uk-advisory
]]--
You can also see the config file on GitHub.
Custom Signs
There are 15 different signs included with the script. They are not guaranteed to work 100% as the script was originally made to only work with regular US signs. You can also add custom signs and fonts yourself.
Custom Sign Position/Size
You can freely change the position and size in the CSS file. Here is an example of how you could put it inside the minimap:
CSS
/* These should replace their counterparts that already exist in the CSS file */
#container {
display: none;
position: absolute;
left: 4vh;
bottom: 4vh;
}
#background {
background-repeat: no-repeat;
background-size: cover;
height: 3rem;
width: 3rem;
}
.background-us-standard {
background: url("images/us_standard.png");
}
.numerals-us-standard {
color: rgb(35, 31, 32);
font-size: 1.25rem;
font-weight: bold;
font-family: highwaygothic;
padding-top: 1.55rem;
transform:scale(1.1, 1);
letter-spacing: 0.1rem;
text-indent: 0.1rem;
}
Image
Images
Download
Direct download: speedlimit_1.0.0.zip (1.6 MB)
Some of my other scripts
[Standalone] [Paid] Sit Anywhere
[Standalone] [PAID] Slash Tires
[Standalone] [Paid] CS Styled Killfeed
[Release] Telescopes
[Release] No Exploding Pumps
[Standalone] Crutches