HRScripts Documentation
  • HRScripts Documentation
  • Resources
    • 📚HRLib
      • Classes
        • HRLibConfig
        • HRLibClientFPlayer
        • HRLibServerFPlayer
        • HRLibClientIPlayer
        • HRLibServerIPlayer
        • HRLibCloseIPlayer
        • HRLibCloseFPlayer
        • HRLibBlipOptions
        • HRLibBlipForCoordOptions
        • HRLibBlipForEntityOptions
        • HRLibBlipForAreaOptions
        • HRLibBlipForPickupOptions
        • HRLibInputDialogueTextOptions
        • HRLibVehicleProperties
      • Modules
        • Bridge
          • Shared
          • Client
          • Server
        • Callbacks
          • Shared
          • Client
          • Server
        • Closest
          • Client
        • Controls Disable
          • Client
        • CreateBlip
          • Client
        • DiscordMsg
          • Server
        • DoesIdExist
          • Shared
        • FPlayer
          • Shared
          • Client
          • Server
        • GetPedsInVehicle
          • Client
        • GetPedWeapons
          • Client
        • GetPlayers
          • Client
        • GetVehicleDoorStatus
          • Client
        • GetVehicleFromPlate
          • Client
        • Interface
          • Client
          • Server
        • IPlayer
          • Client
          • Server
        • PlayerIdentifiers
          • Server
        • RadomValueWithNoRepetition
          • Shared
        • RegCommand
          • Client
          • Server
        • Resource
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
    • HRGarages
      • Classes
        • HRGaragesConfig
        • HRGaragesVehicleInfo
        • HRGaragesClientFunctions
      • Exports
        • Server
    • 📦HRStorages
      • Exports
        • Client
        • Server
      • Callbacks
      • Commands
    • 🧹HRComserv
    • 🥷HRHostage
    • HRAdminMenu
      • Events
      • Exports
        • Client
        • Server
      • State Bags
    • ☑️HRWhitelist
    • HRExtraCommands
    • 🚦HRRealisticTraffic
    • 🗣️HRNPCDialogue
      • Classes
Powered by GitBook
On this page
  • Installation
  • Features
  • Config Preview
  1. Resources

HRRealisticTraffic

standalone script, enhancing city life with dynamic traffic changing according to the different times of the day

PreviousHRExtraCommandsNextHRNPCDialogue

Last updated 3 months ago

Installation

  • Download 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

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.

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

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
        }
    }
}
🚦
HRRealisticTraffic