Raised This Month: $ Target: $400
 0% 

Hostage Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Evaldas
Member
Join Date: Jul 2005
Location: Lithuania
Old 10-22-2005 , 16:01   Hostage Sounds
Reply With Quote #1

I'm using one old AMX plugin, and want to make it work on my server. So here is what I have (done some changes):

Code:
#include <amxmodx> 

#define SOUNDS_NUM 8

new sounds_list[SOUNDS_NUM][] = {"misc/hostages/getouttahere.wav", "misc/hostages/illfollow.wav", "misc/hostages/youlead.wav", "misc/hostages/letsdoit.wav", "misc/hostages/letsgo.wav", "misc/hostages/letshurry.wav", "misc/hostages/letsmove.wav", "misc/hostages/okletsgo.wav"}

public plugin_precache()
{
	precache_sound("misc/hostages/getouttahere.wav")
	precache_sound("misc/hostages/illfollow.wav")
	precache_sound("misc/hostages/youlead.wav")
	precache_sound("misc/hostages/letsdoit.wav")
	precache_sound("misc/hostages/letsgo.wav")
	precache_sound("misc/hostages/letshurry.wav")
	precache_sound("misc/hostages/letsmove.wav")
	precache_sound("misc/hostages/okletsgo.wav")
}

public plugin_init()
{
	register_plugin("Hostage Sounds", "x.x", "xxxxx")
	return PLUGIN_CONTINUE
}

public EmitSound(entity, channel, const sample[])
{
	if(equal(sample, "hostage/hos1.wav") || equal(sample, "hostage/hos2.wav")
	|| equal(sample, "hostage/hos3.wav") || equal(sample, "hostage/hos4.wav")
	|| equal(sample, "hostage/hos5.wav") || equal(sample, "hostage/hos6.wav")
	|| equal(sample, "hostage/hos7.wav")) 
	{
		emit_sound(entity, CHAN_VOICE, sounds_list[random_num(0, SOUNDS_NUM-1)], 1.0, ATTN_NORM, 0, PITCH_NORM) 
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
}
Tested, but hostages still use hos...wav instead new ones. What is wrong?
__________________
Evaldas is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-22-2005 , 18:05  
Reply With Quote #2

becasue there is no EmitSound.
check the wiki if there is some new function, but i think you have to register an event....not sure witch
http://www.amxmodx.org/funcwiki.php
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-22-2005 , 18:06  
Reply With Quote #3

do you think he will understand what you said?
__________________
atomic is offline
WaZZeR++
Veteran Member
Join Date: Mar 2005
Location: Sweden
Old 10-22-2005 , 18:18  
Reply With Quote #4

no.....but maybe someone can help him, becasue i have now clue what function or event that can be.
I just told the next persone whats worng so he souldnt need to think: "Hummm, whats the problem here?"
saving-others-time-thing....
WaZZeR++ is offline
Send a message via MSN to WaZZeR++
atomic
Veteran Member
Join Date: Jan 2005
Location: What The Foot?
Old 10-22-2005 , 18:20  
Reply With Quote #5

__________________
atomic is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-22-2005 , 19:26  
Reply With Quote #6

The problem is that you never register FM_EmitSound with Fakemeta.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Evaldas
Member
Join Date: Jul 2005
Location: Lithuania
Old 10-22-2005 , 21:16  
Reply With Quote #7

Thank you XxAvalanchexX. Now plugin works, and looks like:

Code:
#include <amxmodx> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Hostage Sounds", "0.6", "Evaldas")     register_forward( FM_EmitSound, "EmitSound" ) } public plugin_precache() {     precache_sound("misc/hostages/okletsgo.wav")     precache_sound("misc/hostages/getouttahere.wav")     precache_sound("misc/hostages/letsgo.wav")     precache_sound("misc/hostages/illfollow.wav")     precache_sound("misc/hostages/youlead.wav") } public EmitSound(entity, channel, const sound[]) {     if( equal( sound, "hostage/hos1.wav" ))     {         emit_sound(entity, channel, "misc/hostages/okletsgo.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)         return FMRES_SUPERCEDE;     }     if( equal( sound, "hostage/hos2.wav" ))     {         emit_sound(entity, channel, "misc/hostages/getouttahere.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)         return FMRES_SUPERCEDE;     }     if( equal( sound, "hostage/hos3.wav" ))     {         emit_sound(entity, channel, "misc/hostages/letsgo.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)         return FMRES_SUPERCEDE;     }     if( equal( sound, "hostage/hos3.wav" ))     {         emit_sound(entity, channel, "misc/hostages/letsgo.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)         return FMRES_SUPERCEDE;     }     if( equal( sound, "hostage/hos4.wav" ))     {         emit_sound(entity, channel, "misc/hostages/illfollow.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)         return FMRES_SUPERCEDE;     }     if( equal( sound, "hostage/hos5.wav" ))     {         emit_sound(entity, channel, "misc/hostages/youlead.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)         return FMRES_SUPERCEDE;     }         return FMRES_IGNORED; }
__________________
Evaldas is offline
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 01-08-2006 , 08:52  
Reply With Quote #8

i know this is old but i found it

This plugin doesnt work on my Linux Server.
When i touch a hostage it comes no Sound.

The Sounds are on the Server and on the clients computer. It comes no errors in the logs so can someone help me plz ???
__________________
SORRY 4 MY BAD ENGLISH
ch3cker is offline
Evaldas
Member
Join Date: Jul 2005
Location: Lithuania
Old 01-08-2006 , 16:31  
Reply With Quote #9

Do you have the sound files?
__________________
Evaldas is offline
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 01-09-2006 , 09:02  
Reply With Quote #10

yes i have
i changed the line to the sound file like this
Code:
emit_sound(entity, channel, "misc/fun/hostages/hos1.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
and

Code:
precache_sound("misc/fun/hostages/hos1.wav")
__________________
SORRY 4 MY BAD ENGLISH
ch3cker 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 23:53.


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