AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   voice rules ? (https://forums.alliedmods.net/showthread.php?t=77051)

killler 09-04-2008 09:34

voice rules ?
 
hi, first I'm sorry for my english.:mrgreen:

my question is..
There is a situation , that when i write some code in the consol..
the code will activated media file ??

(i want do record "voice rules")

TheRadiance 09-05-2008 09:57

Re: voice rules ?
 
At first, you should convert your media file (in your situation sound) into correct HL format. Then you should write a script that will activate this sound.

TheRadiance 09-05-2008 10:15

Re: voice rules ?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>

new const plname[]="voice_rules"
new const plvers[]="1.0"
new const plauth[]="killer"

#define ACCESS ADMIN_LEVEL_A //Admin with flag "m".

public plugin_init()
{
    
register_plugin(plname,plvers,plauth)
    
register_concmd("amx_vrules","cmdSound",ACCESS)
}

public 
plugin_precache()
    
precache_sound("sound/misc/firstblood.wav"//your sound in HL format instead of "firstblood.wav".

public cmdSound(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1))
        return 
PLUGIN_HANDLED
    emit_sound
(id,CHAN_VOICE,"sound/misc/firstblood.wav",1.0,ATTN_NORM,0,PITCH_NORM // Non-standart files must be precached!
    
client_print(id,print_console,"[AMXX] Voice Rules!."//Your text for example.
    
return PLUGIN_HANDLED


After typing "amx_vrules" in console, your sound will be played.

killler 09-05-2008 12:10

Re: voice rules ?
 
first , ty !!


I'm sorry that I so idiot :oops:..


I Need to save the thing that you give to me as amxx file , put it in amxmodx/plugins/ and write the file name.amxx in the plugins.ini ?

:oops::oops:

TheRadiance 09-06-2008 04:03

Re: voice rules ?
 
1 Attachment(s)
Quote:

first , ty !!


I'm sorry that I so idiot ..


I Need to save the thing that you give to me as amxx file , put it in amxmodx/plugins/ and write the file name.amxx in the plugins.ini ?

voice_rules.amxx --> /addons/amxmodx/plugins/
voice_rules.amxx --> /addons/amxmodx/configs/plugins.ini

If you want your own sound to be played, just give me it and i'll include it into plugin.

xPaw 09-06-2008 04:24

Re: voice rules ?
 
but he wanted not that, he want, when you starting speak in mic, it shows rules in chat like, no flood, no music or smth

killler 09-06-2008 05:50

Re: voice rules ?
 
yes , I want my own sound :mrgreen: plz..

http://ormaoz.off.co.il/voice_rules.wav

TheRadiance 09-06-2008 07:30

Re: voice rules ?
 
Quote:

but he wanted not that, he want, when you starting speak in mic, it shows rules in chat like, no flood, no music or smth
hmm

Quote:

...that when i write some code in the consol..
the code will activated media file ??
Quote:

yes , I want my own sound plz..
wait a minute :)

killler 09-06-2008 09:18

Re: voice rules ?
 
http://www.hapoel4ever.com/html/emoticons/rose.gifhttp://www.trix.co.il/style_emoticon...ult/worthy.gif

TheRadiance 09-07-2008 02:28

Re: voice rules ?
 
You must convert your sound in HL format.
HL format is: 176 kbps, 022 KHz


All times are GMT -4. The time now is 03:18.

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