Raised This Month: $ Target: $400
 0% 

custom hostage sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 09-17-2006 , 17:31   custom hostage sound
Reply With Quote #1

hi guys
can you help me with this code
Code:
#include <amxmodx>
#include <fakemeta>

#define    PLUGIN        "hostage sound"
#define    VERSION        "0.1"
#define    AUTHOR        "checker"

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

new CUSTOM_SOUND[] = "hostage/female/hos2.wav";

public plugin_precache()
  precache_sound(CUSTOM_SOUND);

public EmitSound(entity, channel, const sound[])
{
  if(pev_valid(entity))
  {
    if(containi(sound, "hostage/hos1.wav")!=-1 && containi(sound, "hostage/hos2.wav")!=-1 && containi(sound, "hostage/hos3.wav")!=-1 && containi(sound, "hostage/hos4.wav")!=-1 && containi(sound, "hostage/hos5.wav")!=-1)
    {
      emit_sound(entity, channel, CUSTOM_SOUND, 1.0, ATTN_NORM, 0, PITCH_NORM);
      return FMRES_SUPERCEDE;
    }
  }
  return FMRES_IGNORED;
}
i changed the custom spray sound by v3x, but it doesn't work.
__________________
SORRY 4 MY BAD ENGLISH
ch3cker is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-18-2006 , 00:10   Re: custom hostage sound
Reply With Quote #2

Though contain native way isn't the best for this, should be || instaead of &&
VEN is offline
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 09-18-2006 , 06:47   Re: custom hostage sound
Reply With Quote #3

yea thx
now it works

is it possible that is for custom sound more than 1 sound is and it will play a random sound instead of the normal hostage sound ??
__________________
SORRY 4 MY BAD ENGLISH
ch3cker is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-18-2006 , 06:59   Re: custom hostage sound
Reply With Quote #4

Take a look, i've done that before, it should give you the idea of how to do such things.
Attached Files
File Type: sma Get Plugin or Get Source (hostage_voices.sma - 676 views - 1.6 KB)
VEN is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode