# ProjectedTexture

- **Ortam:** İstemci
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Global.ProjectedTexture
- **Çeviri tarihi:** 2025-09-08

```lua
ProjectedTexture ProjectedTexture()
```

## Açıklama

Yeni bir [ProjectedTexture](https://gmod.tr/wiki/ProjectedTexture) oluşturur.

## Döndürdüğü Değer

1. [ProjectedTexture](https://gmod.tr/wiki/ProjectedTexture): Yeni oluşturulmuş yansıtılmış doku.

### Örnek

Bir [Scripted Entity](https://gmod.tr/wiki/Scripted_Entities)'ye bağlı basit bir ProjectedTexture oluşturur.

Bu kodun paylaşımlı (shared) değil, sadece istemci tarafında (clientside) çalıştırılması gerektiğini unutmayın.

```lua
function ENT:OnRemove()
	if ( IsValid( self.lamp ) ) then
		self.lamp:Remove()
	end
end

function ENT:Think()
	-- Keep updating the light so it's attached to our entity
	-- you might want to call other functions here, you can do animations here as well
	local pos = self:GetPos()
	local angles = self:GetAngles()

	if ( IsValid( self.lamp ) ) then
		self.lamp:SetPos( pos )
		self.lamp:SetAngles( angles )
		self.lamp:Update()
	else
		local lamp = ProjectedTexture() -- Create a projected texture
		self.lamp = lamp -- Assign it to the entity table so it may be accessed later

		-- Set it all up
		lamp:SetTexture( "effects/flashlight001" )
		lamp:SetFarZ( 500 ) -- How far the light should shine

		lamp:SetPos( pos ) -- Initial position and angles
		lamp:SetAngles( angles )
		lamp:Update()
	end
end
```

- [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/Global.ProjectedTexture
