loadZoneData
exports["RiP-Environment"]:loadZoneData(zone)
This server function toggles a weather mode
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
zone | String | Yes | Zone name if weather zones enabled (city ,sandy ,paleto ) |
Returned Object
Name | Type | Explenation |
---|---|---|
zones | Boolean | If weather zones enabled |
current | String | Current weather type index |
queue | Table | Current weather queue |
Queue Table
Name | Type | Explenation |
---|---|---|
Index | Integer | Queue index (unique) |
Name | String | Weather name |
Duration | Integer/String | Weather duration in minutes ( freeze if freezed, random if no queue, reallife if real-weather) |
Example
local callback = exports["RiP-Environment"]:loadZoneData("city")
for r,p in pairs(callback.queue) do
if callback.current == p.Index then
print("current weather type: "..p.Name)
end
end