hlmod.hu
https://hlmod.hu/

Egyedi Spray hangok
https://hlmod.hu/viewtopic.php?f=10&t=1707
Oldal: 1 / 1

Szerző:  Silverss [ 2010.04.20. 18:02 ]
Hozzászólás témája:  Egyedi Spray hangok

Találtam egy jó kis kódot, amivel egyedi Spray lefújás hangokat adhattok hozzá.
Kód:
#include <amxmodx>
#include <fakemeta>

#define   PLUGIN      "Custom spray sound"
#define   VERSION      "0.2"
#define   AUTHOR      "v3x"

public plugin_init()
{
  register_plugin(PLUGIN, VERSION, AUTHOR);
  register_forward(FM_EmitSound, "EmitSound");
}

new CUSTOM_SOUND[] = "misc/css_sprayer.wav";

public plugin_precache()
  precache_sound(CUSTOM_SOUND);

public EmitSound(entity, channel, const sound[])
{
  if(pev_valid(entity))
  {
    if(contain(sound, "player/sprayer.wav")!=-1)
    {
      emit_sound(entity, channel, CUSTOM_SOUND, 1.0, ATTN_NORM, 0, PITCH_NORM);
      return FMRES_SUPERCEDE;
    }
  }
  return FMRES_IGNORED;
}


Az egyedi hang hozzáadásához ezt a sort írd át:
Kód:
new CUSTOM_SOUND[] = "misc/css_sprayer.wav";

Szerző:  Silverss [ 2010.04.20. 18:03 ]
Hozzászólás témája:  Re: Egyedi Spray hangok

Eredeti plugin és készítője: http://forums.alliedmods.net/showthread.php?p=177379

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/