Raised This Month: $ Target: $400
 0% 

Problem.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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