Raised This Month: $ Target: $400
 0% 

bombdefsound help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Amonel
Senior Member
Join Date: May 2009
Old 05-30-2010 , 09:36   bombdefsound help
Reply With Quote #1

PHP Code:
#include <amxmodx>

#define PLUGIN    "bomb_defused"
#define AUTHOR    "AmoneL"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid("TextMsg"), "eTextMsg")
}

public 
eTextMsg(msg_idmsg_destmsg_entity)
{
    static 
szMessage[64]
    
get_msg_arg_string(2szMessage63)
    if(
equali(szMessage"#Bomb_Defused"))
        
set_msg_arg_string(2"B o m b   d e f u s e d !")

i want to make players exec sound "radio/bombdef.wav", i tried cliend_cmd spk.. but doesn't work

also using http://forums.alliedmods.net/showthread.php?t=98643 will freeze my server
Amonel is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-30-2010 , 09:42   Re: bombdefsound help
Reply With Quote #2

Any error using spk?
Also, when you precache the sound, the folder sound is automatically loaded, so you would precache /bombdefuse/bomb.wav, that would mean sounds/precache/bombdefuse/bomb.wav
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
Amonel
Senior Member
Join Date: May 2009
Old 05-30-2010 , 09:48   Re: bombdefsound help
Reply With Quote #3

sounds/radio/bombdef.wav is a default sound... no need to precache

Last edited by Amonel; 05-30-2010 at 09:50.
Amonel is offline
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 05-30-2010 , 10:00   Re: bombdefsound help
Reply With Quote #4

PHP Code:
#include <amxmodx>

#pragma semicolon 1

new const g_szText[]  = "B o m b   D e f u s e d !";


public 
plugin_init()
{
      
register_plugin("bomb_defused""1.0""Amonel");
      
      
register_message(get_user_msgid("TextMsg"), "Message_TextMsg");
      
      
register_event("TextMsg""Event_TextMsg""a");
}

public 
Message_TextMsg(iMsgIDiMsgDestiReceiver)
{
      new 
szMessage[64];
      
      
get_msg_arg_string(2szMessagecharsmax(szMessage));
      
      if(
equali(szMessage"#Bomb_Defused"))
            
set_msg_arg_string(2g_szText);
      
      return 
PLUGIN_CONTINUE;
}

public 
Event_TextMsg()
{
      new 
szMessage[64];
      
      
read_data(2szMessagecharsmax(szMessage));
      
      if(
equali(szMessageg_szText))
            
client_cmd(0"spk radio/bombdef.wav");
      
      return 
PLUGIN_CONTINUE;

Not tested.
__________________
unnyquee is offline
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 05:25.


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