# WEAPON:TranslateActivity

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

```lua
number WEAPON:TranslateActivity( number act )
```

## Açıklama

Genel bir aktiviteyi, tutuş tipine özgü aktiviteler gibi daha spesifik bir aktiviteye çevirir.

Çevrilen aktivite daha sonra [Entity:SelectWeightedSequence](https://gmod.tr/wiki/Entity:SelectWeightedSequence) ve benzeri fonksiyonlar aracılığıyla sahibin modelinden animasyonlar talep etmek için kullanılır.

Örneğin, `ACT_MP_RUN`, `ACT_HL2MP_RUN_PISTOL` olur.

## Argümanlar

1. [number](https://gmod.tr/wiki/number) ile [ACT enum](https://gmod.tr/wiki/Enums/ACT) **act**: Çevrilecek aktivite

## Dönen Değerler

1. [number](https://gmod.tr/wiki/number) ile [ACT enum](https://gmod.tr/wiki/Enums/ACT) **act**: Çevrilen aktivite

### Örnek

Varsayılan eylem

```lua
function SWEP:TranslateActivity( act )

	if ( self:GetOwner():IsNPC() ) then
		if ( self.ActivityTranslateAI[ act ] ) then
			return self.ActivityTranslateAI[ act ]
		end
		return -1
	end

	if ( self.ActivityTranslate[ act ] != nil ) then
		return self.ActivityTranslate[ act ]
	end

	return -1

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/WEAPON:TranslateActivity
