Raised This Month: $ Target: $400
 0% 

Problem.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sQn
Member
Join Date: May 2007
Location: Poland, FtF Server :)
Old 11-09-2007 , 10:30   Problem.
Reply With Quote #1

I wont block standart radio sound ct_fireinhole.wav

PHP Code:
#include <amxmodx> 
#include <amxmisc>
#include <engine>
#include <csx>
#include <fakemeta>
new g_RadioTimer[33]
new 
wital[33]
public 
plugin_init(){
 
 
register_plugin("Custom Grenades sounds","1.0","sQn")
 
register_cvar("amx_real_radio""1")
         
 
register_forward(FM_EmitSound,"fw_emitsound");
 return 
PLUGIN_CONTINUE  
}
public 
msg_audio()
{
    if(
get_msg_args() != || get_msg_argtype(2) != ARG_STRING) {
        return 
PLUGIN_CONTINUE
    
}
    new 
arg2[20]
    
get_msg_arg_string(2arg219)
    if(
equal(arg2[1], "!MRAD_FIREINHOLE"))
    {
  return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}
public 
fw_emitsound(entity,channel,const sample[],Float:volume,Float:attenuation,fFlags,pitch)
{
    if(
equali(sample,"radio/ct_fireinhole.wav"))
    return 
FMRES_SUPERCEDE;
    
    
    return 
FMRES_IGNORED;
}
public 
grenade_throw(id,ent,wid)
{
 if (
get_cvar_num("amx_real_radio"))
 {
 
wital[id] = 1
 
new randomizer[33]
 
randomizer[id] = (random_num(1,2))
 
 if(
randomizer[id] == 1)
 {
 
emit_sound(id,CHAN_AUTO"voi/g1.wav"1.0ATTN_NORM0PITCH_NORM
 }
 else if(
randomizer[id] == 2)
 {
 
emit_sound(id,CHAN_AUTO"voi/g2.wav"1.0ATTN_NORM0PITCH_NORM
 }
 
 }
 return 
PLUGIN_HANDLED
}
 
public 
radiotimer(id) {
 
g_RadioTimer[id] = 0
 
return PLUGIN_HANDLED
}
public 
client_connect(id) {
 
g_RadioTimer[id] = 0
}
public 
client_disconnect(id) {
 
g_RadioTimer[id] = 0
}
public 
plugin_precache()
{
 
precache_sound"voi/g1.wav")
 
precache_sound"voi/g2.wav")
 return 
PLUGIN_CONTINUE

__________________

80.52.244.150:27016
sQn is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 11-09-2007 , 10:48   Re: Problem.
Reply With Quote #2

It's been a while since CS...but if I remember correctly, as of v1.5 the radio commands were not emit_sounds...as in the enemies couldn't hear them.

You probably have to block a PlaybackEvent or something. Not sure where radio commands come from but if I remember right, it's definitely not emit_sound. Not proximity based at all.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2007 , 11:15   Re: Problem.
Reply With Quote #3

You can use VEN's plugin :
http://forums.alliedmods.net/showthread.php?p=193239
ConnorMcLeod is offline
sQn
Member
Join Date: May 2007
Location: Poland, FtF Server :)
Old 11-09-2007 , 14:35   Re: Problem.
Reply With Quote #4

No i write my plug-in.I don't based on VEN plug-in.Sorry for cvar amx_real_radio
__________________

80.52.244.150:27016
sQn is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 11-10-2007 , 09:31   Re: Problem.
Reply With Quote #5

No.

You can find out how to do it from VEN's plug-in.

Wy możecie wyjaśniać jak robić to od *VEN's* plug-in.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Reply


Thread Tools
Display Modes

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 01:17.


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