1. 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);
    Code:
    Effect.server.Run("assets/prefabs/weapons/ak47u/sound/ak74u-attack-silenced.asset", player.transform.position);
    I have managed to play the rocket explosion sound but I got the effect also.
    Sorry if the answer is obvious I'm new to C# and developing oxide plugins.
     
    Last edited by a moderator: Aug 3, 2017
  2. player.transform.psoition -> player.transform.position
     
  3. I'm using Visual Studio and that typo was made while I was writing the post and I would see an error in the console which I don't.
    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
  4. If you are posting code snippets that have incorrect parts in them and you are asking for help because its not working, i would have thought you would want these errors to be corrected ;) most people would have copied their code snippets straight from their code. As to why this is still not working, the most reasonable solution i can see is that these prefabs are not the correct prefabs, in which you would have to find others as the rest of your code looks fine.
     
  5. Yea you can’t seem to use .asset files to run sounds / effects.

    They have to be prefab.