# ENTITY:SetupDataTables

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

```lua
ENTITY:SetupDataTables()
```

## Açıklama

Entity'nin [Veri Tablolarını (Data Tables)](https://gmod.tr/wiki/Networking_Entities) kurması gerektiğinde çağrılır.

Bu, Ağa Bağlı Değerleri Ayarlama/Alma (Set/Get Networked Values) yöntemini kullanmaktan çok daha iyi bir seçenektir.

Bu kanca (hook), [GM:OnEntityCreated](https://gmod.tr/wiki/GM.OnEntityCreated) ve [GM:NetworkEntityCreated](https://gmod.tr/wiki/GM:NetworkEntityCreated)'dan sonra çağrılır.

### Örnek

Ağa bağlı değişkenleri ayarlar, SetAmount, GetAmount, GetBloodPos, SetBloodPos, GetUrinePos, SetUrinePos fonksiyonlarını ekler.

Bu fonksiyon, yalnızca 4'ü (#0-3) destekleyen string'ler hariç, tür başına yalnızca 32 veri tablosunu (#0-31) destekler.

```lua
function ENT:SetupDataTables()

	self:NetworkVar( "Float", 0, "Amount" )
	self:NetworkVar( "Vector", 0, "BloodPos" )
	self:NetworkVar( "Vector", 1, "UrinePos" )

	if SERVER then
		self:SetAmount( 3 )
		self:SetBloodPos( Vector( 0, -32, 0 ) )
		self:SetUrinePos( Vector( 0, 0, -16 ) )
	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/ENTITY:SetupDataTables
