Raised This Month: $ Target: $400
 0% 

Help me PLZ part 2 :)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sQn
Member
Join Date: May 2007
Location: Poland, FtF Server :)
Old 11-11-2007 , 11:51   Help me PLZ part 2 :)
Reply With Quote #1

I wants in order to all near (about) it victims or attackers listens sounds tk and ta.


PHP Code:
#include <amxmodx>
#include <amxmisc>
new const PLUGIN[] = "Ta and tk sounds"
new const VERSION[] = "1.0"
new const AUTHOR[] = "sQn"
new const g_teamattack_sounds[][] =
{
 
"tk_1.wav",
 
"tk_2.wav",
 
"tk_3.wav",
 
"tk_4.wav"
}
new const 
g_teamkill_sounds[][] =
{
 
"taunt_1.wav",
 
"taunt_2.wav",
 
"taunt_3.wav",
 
"taunt_4.wav",
 
"taunt_5.wav"
}
public 
plugin_init()
{
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_event("Damage""damage_event""b""2>10")
 
}
public 
plugin_precache()
{
 
precache_sound"FtF/tk_1.wav" )
 
precache_sound"FtF/tk_2.wav" )
 
precache_sound"FtF/tk_3.wav" )
 
precache_sound"FtF/tk_4.wav" )
 
 
precache_sound"FtF/taunt_1.wav" )
 
precache_sound"FtF/taunt_2.wav" )
 
precache_sound"FtF/taunt_3.wav" )
 
precache_sound"FtF/taunt_4.wav" )
 
precache_sound"FtF/taunt_5.wav" )
}
public 
client_damage(attackervictimdamagewpnindexhitplaceTA)
{
 if(
TA)
 {
  
emit_sound(victimCHAN_VOICEg_teamattack_sounds[random_num(0sizeof g_teamattack_sounds 1)], VOL_NORMATTN_NORM0PITCH_NORM)
 }
}
public 
damage_eventvictim ) {
   
   new 
damage read_data(2)
   new 
weaponhitplace
   
new attacker get_user_attacker(victim,weapon,hitplace)
   return 
PLUGIN_CONTINUE
//TK
  
  
else if (get_user_health(victim) <= &&(get_user_team(victim) == get_user_team(attacker)) {
   if (
getrandom() >= && getrandom() <= 80) {
   
client_cmd(attacker,"spk FtF/pl/tk_1.wav")
   
client_cmd(victim,"spk FtF/pl/taunt_1.wav")
   }
   if (
getrandom() >= && getrandom() <= 80) {
   
client_cmd(attacker,"spk FtF/pl/tk_2.wav")
   
client_cmd(victim,"spk FtF/pl/taunt_2.wav")
   }
   if (
getrandom() >= && getrandom() <= 80) {
   
client_cmd(attacker,"spk FtF/pl/tk_3.wav")
   
client_cmd(victim,"spk FtF/pl/taunt_3.wav")
   }
   else {
   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:18.


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