FreeScriptsDocsSupport

Browse

  • Documentation
    • FAQ
  • 📱 Phone
    • 🧠 Installation
    • 🦄 Unique phones
    • 💿 Configure
      • 💄 Additional Features
      • 📸 Camera
      • 📹 Video Calls
      • 🍏 Apps
      • 🪵 Logs
      • 🔋 Battery System
      • 🖼️ Media Customization
      • 🗣️ Multi-Language Support
      • 🗃️ SIM Cards
      • 🚗 Valet System
      • 🖼️ Wallpapers App
      • ⛅ Weather Widget
    • ⏭️ Exports
      • Client side
        • 👁️‍🗨️ General
        • 📞 Calls
        • ☀️ Groups
        • 🏢 Companies
        • 🔧 Misc
        • 🗼 Signal Towers
      • Server side
        • 🆔 Identify Player
        • ☎️ Sim Cards
        • 📞 Calls
        • 💬 Messages
        • ☀️ Groups
        • 🌐 Cell Broadcast
        • 💸 YPay
        • 📧 Mail
        • 📪 Notifications
        • 📵 Screen Damage
        • 🗯️ Dark Chat
        • 🔧 Misc
    • 🪛 Commands
    • 📡 Events
      • Server side
        • 📨 Messages
        • 📱 Social Media
        • ☎️ Calls
    • 🍎 Custom apps
    • 🏦 Banking App
    • 📈 Markets App
    • 👜 State bags
  • ☎️ Boomer Phone
    • 🧠 Installation
    • 🦄 Unique phones
    • ⏯️ Exports
      • Client side
  • 🏠 Properties
    • 🧠 Installation
    • 💿 Configure
    • 🔗 Compatibility
      • Phones
        • YSeries
        • LB Phone
    • 📖 Guides
      • 🛏️ Starter Apartments
      • 🐚 Add More Shells
      • 🔑 Physical Keys
      • 🪑 Furniture As Items
      • 🛠️ Fix Interactable Points
      • 📋 Discord Logs Setup
    • ⏭️ Exports
      • Client side
        • GetCurrentPropertyId
        • GetCurrentProperty
        • IsPointInsideProperty
        • OpenPropertyMenu
        • AddKey
        • RemoveKey
        • SetWaypointToProperty
        • GetAllProperties
        • GetKeyHolders
        • PoliceRaidDoor
        • WrapIntoProperty
        • GetClosestDoor
        • GetEntryCoordinates
        • UseLockpick
        • PoliceRaidDoor
      • Server side
        • GetAllProperties
        • GetPropertyData
        • AddKey
        • RemoveKey
        • ToggleDoorlock
        • GetPlayersInProperty
        • GetKeyHolders
        • DeleteProperty
        • AddStarterApartment
        • SellProperty
        • TransferProperty
    • 🪝 Hooks System
      • buyProperty
      • rentProperty
      • sellProperty
      • deleteProperty
      • createDoor
      • saveSettings
      • setInteractablePoint
      • canEnter
      • canExit
    • 👜 State bags
  • 🏦 Banking
    • 🧠 Installation
    • 🪛 Commands
    • ⏯️ Exports
      • Client side
      • Server side
    • 🪵 Logs
    • 🪝 Hooks
    • 🏦 Banking App
  • 💸 Billing
    • 🧠 Installation
    • ⏭️ Exports
      • Client side
      • Server side
  • 📊 Hud
    • 🧠 Installation
    • ⏭️ Exports
      • Client side
  • 📦 Storage Units
    • 🧠 Installation
  • 🎰 Slots
    • 🧠 Installation
    • 📱 Phone app
  • 🎃 Minigames
    • 🎯 Exports and Usage
    • 🔧 Commands

⛅ Weather Widget

Allows server owners to dynamically control the weather temperature and icon displayed on phone widgets.

Features

  • Live Weather Updates: Temperature and weather icons can be updated in real-time
  • Server Owner Control: Complete control over weather data through exports
  • Automatic Sync: Weather data automatically syncs to all connected phones
  • Fallback System: Graceful fallback to default values if weather system is disabled
  • Force Update Option: Optional immediate sync to all clients
  • NOTE: The weather widget is available only for Humanoid(android) phones as of now.

Configuration

Enable/Disable Weather System

In config/config.misc.lua:

lua
Config.Weather = {}
Config.Weather.Enabled = true                           -- Enable/disable live weather system
Config.Weather.DefaultTemperature = 21                  -- Default temperature in Celsius
Config.Weather.DefaultIcon = 'humanoid/utils/cloudy.png' -- Default weather icon path
Config.Weather.UpdateInterval = 60000                   -- Update interval in milliseconds (1 minute)

Server Exports

Basic Usage

All export functions accept an optional forceUpdate parameter. When set to true, the weather data will be immediately synchronized to all connected clients instead of waiting for the next update cycle.

Parameters:

  • forceUpdate (boolean, optional): If true, immediately syncs data to all clients

Set Temperature

lua
-- Set temperature to 25°C
local success, errorMsg = exports.yseries:SetTemperature(25)
if not success then
    print("Error setting temperature: " .. errorMsg)
end

-- Set temperature with immediate update to all clients
local success, errorMsg = exports.yseries:SetTemperature(25, true)

Set Weather Icon

lua
-- Set custom weather icon
local success, errorMsg = exports.yseries:SetWeatherIcon('humanoid/utils/sunny.png')

-- Set weather icon with immediate update to all clients
local success, errorMsg = exports.yseries:SetWeatherIcon('humanoid/utils/sunny.png', true)

Set Multiple Values at Once

lua
-- Update multiple weather properties
local weatherData = {
    temperature = 28,
    icon = 'humanoid/utils/sunny.png'
}

local success, errorMsg = exports.yseries:SetWeatherData(weatherData)

-- Update with immediate sync to all clients
local success, errorMsg = exports.yseries:SetWeatherData(weatherData, true)

Get Current Weather Data

lua
local weatherData = exports.yseries:GetWeatherData()
print("Current temperature: " .. weatherData.temperature .. "°C")
print("Current icon: " .. weatherData.icon)

Advanced Examples

Integration with External Weather APIs

lua
-- Example: Sync with OpenWeatherMap API
CreateThread(function()
    while true do
        -- Fetch weather data from external API
        local weatherData = GetExternalWeatherData() -- Your implementation
        
        if weatherData then
            exports.yseries:SetWeatherData({
                temperature = weatherData.temp,
                icon = GetWeatherIcon(weatherData.condition) -- Map to your icons
            }, true) -- Force update to all clients
        end
        
        Wait(300000) -- Update every 5 minutes
    end
end)

Weather Icons

Default Icons Available

  • humanoid/utils/cloudy.png - Cloudy weather
  • Add your own custom icons to the UI assets

Custom Weather Icons

  1. Add your weather icon files to ui/public/humanoid/utils/
  2. Reference them in the icon path: humanoid/utils/your-icon.png

Troubleshooting

Weather Not Updating

  1. Check if Config.Weather.Enabled is set to true
  2. Verify the weather system is loaded.
  3. Check for any error messages when calling exports

Icons Not Displaying

  1. Ensure icon paths are correct and files exist in ui/public/
  2. Check browser console for 404 errors on image requests

Performance Considerations

  • The default update interval is 60 seconds to balance real-time updates with performance
  • Consider longer intervals for production servers with many players
  • Weather data is cached and only sent when phones are open

On this page

  • Features
  • Configuration
  • Enable/Disable Weather System
  • Server Exports
  • Basic Usage
  • Advanced Examples
  • Integration with External Weather APIs
  • Weather Icons
  • Default Icons Available
  • Custom Weather Icons
  • Troubleshooting
  • Weather Not Updating
  • Icons Not Displaying
  • Performance Considerations

All Rights Reserved

TeamsGG © 2026

Pages

FreeScriptsDocsSupport

Legal

Terms of ServiceRefunds

Tebex

Tebex ImpressumTebex TermsTebex Privacy

Socials

DiscordYouTube