# HRRealisticTraffic

## Installation

* Download [HRRealisticTraffic](https://github.com/HRScripts/HRRealisticTraffic) from its GitHub repo
* Drag it to your resources folder
* Configure its config.lua file for your server's needs
* Write `start HRRealisticTraffic` in your server.cfg
* Make sure there's no other traffic controlling script in your server, otherwise their will be a conflict
* Restart your server

{% hint style="warning" %}
A time sync (or weather + time sync) script is highly recommended for this script!\
It ensures that the time zones are same for each player in the server and the traffic will not be different.
{% endhint %}

## Features

* Control the traffic for better realism in the game with different time zones of the traffic coefficient
* Control the specific vehicles, creating traffic to be enabled or not with easy setting
* The peds and vehicles are separated in the config.lua file for more configuration
* Everything configuratable easy only on its config.lua file

## Config Preview

```lua
local config = {}

config.enableSpecialTraffic = {
    boats = true,
    trains = true,
    garbageTrucks = true
}

config.traffic = {
    dayTime = {
        diapason = vector2(6, 15), -- The first integer is the begin of the diapason (ingame clock hours) and the second is the end of the diapason
        trafficCoefficient = { -- Each value is in percentage (100% is the maximum)
            peds = 100,
            vehicles = 100
        }
    },
    nightTime = {
        diapason = vector2(16, 5), -- The first integer is the begin of the diapason (ingame clock hours) and the second is the end of the diapason
        trafficCoefficient = { -- Each value is in percentage (100% is the maximum)
            peds = 100,
            vehicles = 100
        }
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hrscripts.gitbook.io/hrscripts-documentation/resources/hrrealistictraffic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
