Zum Hauptinhalt springen

GetCurrentWind

warnung

This export is only available for serverside!

Export Syntax
exports['dream_windturbines']:GetCurrentWind(WithCache) -- Returns Data

Parameter​

  1. 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)