cs_set_weapon_silen

Синтаксис

native cs_set_weapon_silen(index, silence = 1, draw_animation = 1);

Употреба

index
Weapon entity index
silence
If nonzero the weapon will be put into silenced
mode, otherwise the silenced mode will be removed
draw_animation
If 1 and the weapon is currently held by a
client, the appropriate weapon animation will be
played
If 2, same as 1 but follows game behavior by playing
the associated player's model sequence and disallowing
firing while animation is playing.

Описание

Sets the weapon's silenced mode.

Забележка

Only the USP and M4A1 can be set to silenced fire mode as they are the
only guns in the game that provide such a mode.

Забележка

This native does not verify that the provided entity is a weapon
entity. It will result in undefined behavior if used on non-weapon
entities.

Връщаща стойност

1 if silenced mode set successfully, 0 if entity is
not an applicable weapon

Грешка

If an invalid entity index or a client index is
provided, an error will be thrown.