# Environment

{% hint style="warning" %}
**CLIENT FUNCTIONS**
{% endhint %}

## get\_weather\_name

Returns the weather name from a given hash.

#### Parameters

* hash: `number`

#### Returns

* `string`

```lua
bdtk.get_weather_name(hash)
```

***

## get\_game\_time

Returns current game time and formatted version.

#### Returns

* `table`

```lua
bdtk.get_game_time()
```

***

## get\_game\_date

Returns current game date and formatted version.

#### Returns

* `table`

```lua
bdtk.get_game_date()
```

***

## get\_sunrise\_sunset\_times

Returns sunrise and sunset times for given weather.

#### Parameters

* weather: `string`

#### Returns

* `table`

```lua
bdtk.get_sunrise_sunset_times(weather)
```

***

## is\_daytime

Checks if it is currently daytime.

#### Returns

* `boolean`

```lua
bdtk.is_daytime()
```

***

## is\_nighttime

Checks if it is currently nighttime.

#### Returns

* `boolean`

```lua
bdtk.is_nighttime()
```

***

## is\_midday

Checks if it is currently midday.

#### Returns

* `boolean`

```lua
bdtk.is_midday()
```

***

## get\_current\_season

Returns current season.

#### Returns

* `string`

```lua
bdtk.get_current_season()
```

***

## get\_distance\_to\_water

Returns distance from player to nearest water body.

#### Returns

* `number`

```lua
bdtk.get_distance_to_water()
```

***

## get\_zone\_scumminess

Returns the zone scumminess level.

#### Returns

* `integer`

```lua
bdtk.get_zone_scumminess()
```

***

## get\_ground\_material

Returns ground material hash at player's position.

#### Returns

* `number`

```lua
bdtk.get_ground_material()
```

***

## get\_wind\_direction

Returns wind direction as a compass value.

#### Returns

* `string`

```lua
bdtk.get_wind_direction()
```

***

## get\_altitude

Returns player's altitude above sea level.

#### Returns

* `number`

```lua
bdtk.get_altitude()
```

***

## get\_environment\_details

Returns a summary of environmental data.

#### Returns

* `table`

```lua
bdtk.get_environment_details()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boii.dev/fivem-free-resources/bdtk/api/modules/environment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
