Raised This Month: $ Target: $400
 0% 

Say Chat Sounds ( sank_sounds)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 07-22-2007 , 13:44   Say Chat Sounds ( sank_sounds)
Reply With Quote #1

I made a plugin that does the same thing as sank_sounds.
I was interesting in only the sound when you type a word in say.
And i did that but the players exagerate with the sounds.
and i want a limit a 5 says a round.
Dont know how to do that.

Script:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#define PLUGIN "Say Chat Sounds"
#define VERSION "1.0"
#define AUTHOR "FireW@ll"

#define doh2 6
#define wo 2
#define holy 2

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say","Say_sounds")
}


// Cuvintele care le tastezi in chat

new lol_phrase[8][] = {"lol""autolol""lolz""loolz""lo""ol""lool""loll"}

new 
phrase[2][] = {"haha","ha ha"}

new 
phrase2[3][] = {"shit","holy","holyshit"}

new 
phrase3[6][] = {"doh","dohh","dohhh","doh2","dhh","doho"}

new 
woh[4][] = {"woohoo","wooh","woh","woohoo"

new 
dohn [] = {"dohnuts"}

////////////////////////////////////////////////////////////////////////////////////////////////////

// Sunetele care se vor auzi

new lol [] = {"misc/lol"

new 
doh[doh2][] = {"misc/doh","misc/doh2","misc/doh3","misc/doh4","misc/doh5","misc/doh7"}

new 
haha2 [] = {"misc/haha"}

new 
shit [holy][] = {"misc/shit","misc/holyshit"}

new 
woohoo[wo][] = {"misc/woohoo","misc/woohoo2"}

new 
dohnn[] = {"misc/dohnuts"}

////////////////////////////////////////////////////////////////////////////////////////////////////

public Say_sounds(id)
{
    new 
said[192]
    
read_args(said,191)
    for(new 
;2i++)
    if(
containi(said,phrase[i]) != -1){
    
client_cmd(0,"spk %s",haha2)
}
    for(new 
;3i++)
    if(
containi(said,phrase2[i]) != -1){
    new 
s
    s
random_num(0,holy-1)
    
client_cmd(0,"spk %s",shit[s])
}
    for(new 
;6i++)
    if(
containi(said,phrase3[i]) != -1){
    new 
d
    d
random_num(0,doh2-1)
    
client_cmd(0,"spk %s",doh[d])
}
    for(new 
;8i++)
    if(
containi(said,lol_phrase[i]) != -1){
    
client_cmd(0,"spk %s",lol)
}
    for(new 
;8i++)
    if(
containi(said,woh[i]) != -1){
    new 

    w
random_num(0,wo-1)
    
client_cmd(0,"spk %s",woohoo[w])
}
    for(new 
;8i++)
    if(
containi(said,dohn[i]) != -1){
    
client_cmd(0,"spk %s",dohnn)
    break;
    }

}

public 
plugin_precache(){
    
    
precache_sound("misc/haha.wav")
    
precache_sound("misc/shit.wav")
    
precache_sound("misc/doh.wav")
    
precache_sound("misc/doh2.wav")
    
precache_sound("misc/doh3.wav")
    
precache_sound("misc/doh4.wav")
    
precache_sound("misc/doh5.wav")
    
precache_sound("misc/doh7.wav")
    
precache_sound("misc/lol.wav")
    
precache_sound("misc/woohoo.wav")
    
precache_sound("misc/woohoo.wav")
    
precache_sound("misc/dohnuts.wav")

__________________


I hate Spammers....
vl@d is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 07-23-2007 , 06:41   Re: Say Chat Sounds ( sank_sounds)
Reply With Quote #2

new SndSaid[32] - Global var.

if(containi() != -1 && SndSaid[id - 1] < 5){
client_cmd(0, "spk %s", ...)
++SndSaid[id - 1]
}
_Master_ 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 21:31.


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