How do I play a gun fire sound for instance the AK47 sound to a player?
I've already tried
Code:Effect.server.Run("assets/prefabs/weapons/ak47u/effects/attack.prefab", player.transform.position);Code:Effect.server.Run("assets/prefabs/weapons/ak47u/effects/attack_silenced.prefab", player.transform.position);Code:Effect.server.Run("assets/prefabs/weapons/ak47u/sound/ak74u-attack.asset", player.transform.position);I have managed to play the rocket explosion sound but I got the effect also.Code:Effect.server.Run("assets/prefabs/weapons/ak47u/sound/ak74u-attack-silenced.asset", player.transform.position);
Sorry if the answer is obvious I'm new to C# and developing oxide plugins.
Playing gun sounds?
Discussion in 'Rust Development' started by SERVER 3, Aug 2, 2017.
-
player.transform.psoition -> player.transform.position
-
You could follow a guide such as Referencing game/Oxide DLLs in Visual Studio 2015/2017 | Oxide to use Visual Studio to develop. It would point out that typo to you
-
But since that matter so much to you there I fixed the typo.
This is NOT solved.Last edited by a moderator: Aug 3, 2017 -
-
Yea you can’t seem to use .asset files to run sounds / effects.
They have to be prefab.