Installation

2 min readUpdated Today

Overview

ml_climaticvitals tracks a server-wide ambient temperature based on the current GTA weather. Each player gets a "perceived" temperature that shifts based on what they're wearing, whether they're in a vehicle, near a fire, inside an MLO, wet from rain, in a temperature zone, etc. When perceived temp hits extreme values, the player takes health damage and loses hunger/thirst faster. Vehicles with the engine running have a climate control panel with 4 selectable themes. A draggable HUD widget shows ambient and perceived temperature.

Quick Start

  1. Download from CFX Portal
  2. Extract to your resources folder as ml_climaticvitals
  3. Add to server.cfg:
server.cfg
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_climaticvitals
Load Order

ml_climaticvitals must start AFTER ml_bridge and oxmysql.

Resource Name

The resource folder must be named exactly ml_climaticvitals. The script validates this on startup and prints a critical error if mismatched.

Database

Tables are created automatically on first start:

|-------|---------|

| ml_climaticvitals | Stores the current server temperature (single row). Persists temperature across restarts when Config.EnableDB = true |

Disable DB

Set Config.EnableDB = false to run without a database. Temperature resets to Config.DefaultTemperature on each restart.

Verify

After starting, the console prints the resource banner:

lua
1[ml_climaticvitals] Resource started
2[ml_climaticvitals] Developed by Micio Mods | miciomods.it

The temperature HUD widget appears after the player loads in. Use /movetempui to reposition it, /hidetemphud to toggle visibility.

  • HUD not showing, ensure the player is fully loaded. Check Config.RequiredItem if set to an item name (HUD only shows when the item is in inventory)
  • Temperature stuck, the system waits for the first weather report from a client. At least one player must be connected
  • Database errors, verify oxmysql is started and the database connection is working
  • Resource name error in console, rename the resource folder to exactly ml_climaticvitals
  • Climate control not opening, check that the vehicle engine is running and the vehicle class is not in Config.VehicleClimateBlacklist