Adding locations

Adding locations to the automatic fires section is a crucial part of configuring SmartFires to ensure that calls are not too repetitive for those attending them in-game, meaning multiple taking place at the same location. Having a large amount of locations prevents this.

We've setup locations to work both as one long list and also as categories. This enables servers to use our area of patrol settings to set the area of patrol live in game and fires will spawn in that area accordingly provided there are locations setup.

If you do not use the area of patrol settings, you can still categorise locations and the script will pick a random location from any category. This allows you to have your coordinates setup into categories should you wish to move to an area of patrol system in the future.

For example, you may setup a category for the city and another for sandy, this is how we've configured it by default but we've only setup default locations for the city. You may want to gather additional locations for any other categories you create.

How to get coordinates

It is likely your server will have a coordinates tool or ability to have your coordinates on the screen at all times, for example through a menu such as vMenu or even an admin toolkit included in some frameworks.

If your server does not have this ability, we've included a command which can be enabled in the automaticFires section of the config as seen below.

enableLocationCommand = {
            enabled = true, -- The command will give you your current location to insert here, if enabled
            commandName = "mylocation",
            locationColour = "~b~", -- blue
},

There are no permissions to this command as it simply displays a notification to the user with their current location, in a vector3 format. You should also make note of the type of fire it will be, such as a "House" or "Shop" fire, as you will need to record this in the config.

Recording the type of fire allows for automatic fire calls to be created with more of a description, rather than just stating there is a fire, it is better to say there is a House Fire for example, allowing it to be resourced more efficiently relating to the type of fire.

Adding Locations

Coordinates should be added along with the description in the locations = { section of the config.lua file.

-- Use lowercase for location categories
locations = {
            ["city"] = {
                { coords = vector3(387.44, -832.87, 28.29), description = "Shop" },
                { coords = vector3(297.92, -588.88, 42.82), description = "Hospital" },
                { coords = vector3(312.11, -274.83, 53.45), description = "Bank" },
                { coords = vector3(128.41, -214.85, 53.45), description = "Clothing Shop" },
                { coords = vector3(-838.14, -354.27, 37.03), description = "Commercial Building" },
                { coords = vector3(-203.76, -1115.88, 21.82), description = "Construction Site" },
                { coords = vector3(754.81, -791.31, 25.23), description = "Junkyard" },
                { coords = vector3(-8.9, -1565.02, 28.29), description = "Bin" },
                { coords = vector3(20.16, -1505.84, 30.85), description = "Church" },
            },
            ["sandy"] = {

            },
},

As you can see, here are some locations included in the "city" category. If you are not wanting to use multiple categories, just put all of your locations in the city category, this one is already set as default.

All coordinates must be entered in a vector3 format, this is formatted as vector3(x, y, z). The description should be wrapped in speech marks "". Additionally, remember to wrap the entry in curly brackets {} and have a comma between each line.

When adding locations, it may be helpful to just copy existing ones and then edit the coords and description, saving time copying it manually.

All categories are wrapped in square brackets as seen with the ["city"] = { example. Please use lowercase for location categories.

See the next section for more information on our area of patrol settings.

Last updated