# DModelPanel:SetAmbientLight

- **Ortam:** İstemci
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/DModelPanel:SetAmbientLight
- **Çeviri tarihi:** 2026-05-13

```lua
DModelPanel:SetAmbientLight( Color color )
```

## Açıklama

Görüntülenen varlık üzerinde kullanılan çevresel aydınlatmayı belirler.

## Argümanlar

1.. [Renk](https://gmod.tr/wiki/Color) **Renkli**: Çevre aydınlatmasının rengi.

### Örnek

Kırmızı çevre aydınlatması olan karpuzlu bir model panelini gösterir.

```lua
BGPanel = vgui.Create("DPanel")
BGPanel:SetPos(20, 20)
BGPanel:SetSize(200, 200)

local mdl = vgui.Create("DModelPanel", BGPanel)
mdl:SetSize(BGPanel:GetSize())
mdl:SetModel("models/props_junk/watermelon01.mdl")

mdl:SetCamPos(Vector(15, 15, 0))
mdl:SetLookAt(Vector(0, 0, 0))

mdl:SetAmbientLight(Color(255, 0, 0, 255))
```

**Çıkış:** ![](https://gmod.tr/api/uploads/wiki/87c852453da4539aadae.jpg)

- [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/DModelPanel:SetAmbientLight
