GetCurrentWind
warning
This export is only available for serverside!
Export Syntax
exports['dream_windturbines']:GetCurrentWind(WithCache) -- Returns Data
Parameter
- WithCache (Bool) -> Include the current wind cache? Yes or no!
Response
Response Table
{
"speed": int, -- Wind speed
"trend": string, -- [up, down]
-- ONLY WHEN WithCache = true:
"cache": {
['TIMESTAMP'] = int -- Wind speed
}
}
Example Export
local CurrentWind = exports['dream_windturbines']:GetCurrentWind()
print(CurrentWind.speed) -- 💨 Current wind speed
print(CurrentWind.trend) -- 📈 Current wind trend (Going up or down)