# Entity:SelectWeightedSequence

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

```lua
number Entity:SelectWeightedSequence( number act )
```

## Açıklama

Belirtilen aktivite ID'sine karşılık gelen sekans ID'sini döndürür.

[Entity:GetSequenceActivity](https://gmod.tr/wiki/Entity:GetSequenceActivity) fonksiyonunun zıttıdır.

[Entity:LookupSequence](https://gmod.tr/wiki/Entity:LookupSequence) fonksiyonuna benzer.

Ayrıca bakınız: [Entity:SelectWeightedSequenceSeeded](https://gmod.tr/wiki/Entity:SelectWeightedSequenceSeeded).

## Argümanlar

1. [number](https://gmod.tr/wiki/number) **act**: Aktivite ID'si, [ACT enum](https://gmod.tr/wiki/Enums/ACT) sayfasına bakın.

## Döndürdükleri

1. [number](https://gmod.tr/wiki/number): Sekans ID'si

### Örnek

Modelin belirli bir ACT_* enum'una sahip olup olmadığını kontrol etmek ve eğer sahipse bu animasyonu oynatmak için bu hook'u kullanın.

```lua
local VModel = self:GetOwner():GetViewModel()

if ( self:Clip1() == 0 and VModel:SelectWeightedSequence( ACT_VM_RELOAD_EMPTY ) ) then

	local SEQ = self:LookupSequence( ACT_VM_RELOAD_EMPTY )

	if ( SEQ == -1 ) then

		print( "reload" )

		local EnumToSeq = VModel:SelectWeightedSequence( ACT_VM_RELOAD )

		-- Normal şarjör değiştirme animasyonunu oynat
		VModel:SendViewModelMatchingSequence( EnumToSeq )

	else

		print( "reload empty" )

		local EnumToSeq = VModel:SelectWeightedSequence( ACT_VM_RELOAD_EMPTY )

		-- Boş şarjör değiştirme animasyonunu oynat
		VModel:SendViewModelMatchingSequence( EnumToSeq )

	end

end
```

**Çıktı:** Eğer modelde varsa ACT_VM_RELOAD_EMPTY enum'unu oynatacaktır. Yoksa, normal şarjör değiştirme enum'unu oynatacaktır.

- [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:SelectWeightedSequence
