Configuring the resource

You can easily open the config.lua and configure the script to your liking in either notepad, notepad ++ or using Visual Studio Code.

The first section is called main, allowing you to set the following:

main = {
    loadInDistance = 300.0,
    accessPointDistance = 3.0,
    signModelName = {
        left = `prop_led_trafficsign_left`,
        right = `prop_led_trafficsign_right`,
    }
    instructionalText = "Press [E] to adjust sign",
    
    resetSignCommand = "resetsmartsigns",
    resetSignCommandEnabled = true,
    resetSignSuggestion = "Reset all smart signs around the map!",
    
    changeSignCommand = "editsmartsigns",
    changeSignSuggestion = "Edit all smart signs around the map!",
    changeSignCommandEnabled = true,
        
    adjustButton = {0,103},
    developerMode = false,
    
    enableBlips = true,
    shortRangeBlips = true,
    
    badWords = {
        "word1",
        "word2",
    },
    
    centerText = false,
    
    animation = {
        enabled = true,
        dict =  "anim@heists@prison_heiststation@cop_reactions",
        name =  "cop_b_idle",
    }, 
    logging = {
        enabled = false,
        displayName = "Smart Signs",
        colour = 31487,
        title = "**New Sign Log**",
        icon = "https://i.imgur.com/o7oAPb8.png",
        footerIcon = "https://i.imgur.com/n3n7JNW.png",
        dateFormat = "%d-%m-%Y %H:%M:%S", -- Day-Month-Year Hour-Minute-Second

        bannedWordLogs = {
            enabled = true, 
            colour = 16711680,
        }
    },
    soundEffect = {
        enabled = true,
        name = "CONFIRM_BEEP",
        dict = "HUD_MINI_GAME_SOUNDSET",
    },
    signOffset = {0.0, 0.0, 0.0}, -- x, y, z
},

To change the activation key (adjustButton), replace it with your desired key from here.

You can see from the above config just how configurable the resource is, allowing you to set many features such as the load in the distance and access points to edit the text of the signs, the different denied words, and the animations played while the player is typing.

Secondly, the instructionalText section allows you to convert the access message to another language.

We have added the ability to reset all the signs to default by running a simple command of

/resetsmartsigns this will reset all the signs back to the default settings.

You can also edit any of the signs by using /editsmartsigns this will give you the ability to edit any of the signs across the map.

To change the Discord webhook URL, visit sv_smartsigns.lua and change the value of config.main.logging.webhook.

Locations.json file

All sign locations and texts are now visible in the locations.json file, a dynamic file that will update every time players are on your server.

This means that any text set by players on signs will also be saved each time your server is restarted.

Adding new commands

To make it easier to set signs up we have added a /createsmartsign command which will only work while developerMode is set to true in config.lua. You can select left or right on the command depending on what side you want the sign to be.

This command will then spawn a sign prop that can be repositioned with the following controls:

R -- rotates the sign Right Mouse Button -- Exits Spooner Menu Left Mouse Button -- Allows you to move the sign as needed ENTER -- finish placement

Once you press ENTER the new sign location will automatically be added to the locations.json file. You will need to restart your server to see the sign after setting it up.

Last updated