# game.GetTimeScale

- **Ortam:** İstemci, Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/game.GetTimeScale
- **Çeviri tarihi:** 2025-09-08

```lua
number game.GetTimeScale()
```

## Açıklama

[game.SetTimeScale](https://gmod.tr/wiki/game.SetTimeScale) ile ayarlanan zaman ölçeğini döndürür.

Eğer `host_timescale` değerini almak istiyorsanız, şunu kullanın:

```lua
local timescale = GetConVar( "host_timescale" ):GetFloat()
```

## Döndürülen Değer

1. [number](https://gmod.tr/wiki/number): Zaman ölçeği

### Örnek

Gerçek zaman ölçeğini yazdırma.

```lua
-- gerçek zaman ölçeği alınıyor.
local host_timescale = math.Round( GetConVar( "host_timescale" ):GetFloat(), 1 ) -- 1.0000000149012 döndüreceği için math.Round kullanıyoruz
local game_timescale = game.GetTimeScale()
print( "True Timescale: " .. host_timescale  * game_timescale )

-- gerçek zaman ölçeği örneği
if SERVER then
	RunConsoleCommand( "host_timescale", 0.2 ) -- Lua tarafından oluşturulmayan bir ConVar üzerinde SetFloat kullanamayız.
	game.SetTimeScale(5)
end

local host_timescale = math.Round( GetConVar( "host_timescale" ):GetFloat(), 1 ) -- 0.20000000298023 döndüreceği için math.Round kullanıyoruz
local game_timescale = game.GetTimeScale()
print( "Host_TimeScale: " .. host_timescale )
print( "Game_TimeScale: " .. game_timescale )
print( "True Timescale: " .. host_timescale  * game_timescale ) -- 1 olmalı çünkü 0.2 * 5, 1'dir.
```

**Çıktı:**

```lua
True Timescale: 1

Host_TimeScale: 0.2
Game_TimeScale: 5
True Timescale: 1
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/game.GetTimeScale
