Raised This Month: $ Target: $400
 0% 

play sound on team kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-05-2007 , 19:46   play sound on team kill
Reply With Quote #1

how do i play a sound on team kill?

thx
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
scrtxxcaz
Senior Member
Join Date: Feb 2007
Location: a place u cant find
Old 05-06-2007 , 02:33   Re: play sound on team kill
Reply With Quote #2

Code:
public plugin_int(){
         register_event("DeathMsg","event_death","a","1>0")
}
plubic event_death(id){
         new Killer = read_data(1) 
         new Victim = read_data(2) 
         new teamA = get_user_team(Killer)
         new teamB = get_user_team(Victim)
         if(teamA == teamB)
         {
                  //play sound
          }
}
__________________
Please leave your name when giving me any karma

Counter Strike Freeze Tag
Status: Testing.... (bugs)

Revised Registration
Status: In Progress
scrtxxcaz is offline
Send a message via AIM to scrtxxcaz
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-06-2007 , 12:34   Re: play sound on team kill
Reply With Quote #3

thank you
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 05-06-2007 , 12:51   Re: play sound on team kill
Reply With Quote #4

If your using ATAC3 RC2+ system:

Code:
#include <amxmodx> #include <atac> #define PLUGIN "PLUGIN_NAME" #define VERSION "1.0" #define AUTHOR "YOUR_NAME" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     atac_register_addon() } public atac_team_kill(killer, victim) {     //play sound }
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-06-2007 , 15:24   Re: play sound on team kill
Reply With Quote #5

Quote:
Originally Posted by scrtxxcaz View Post
Code:
public plugin_int(){
         register_event("DeathMsg","event_death","a","1>0")
}
plubic event_death(id){
         new Killer = read_data(1) 
         new Victim = read_data(2) 
         new teamA = get_user_team(Killer)
         new teamB = get_user_team(Victim)
         if(teamA == teamB)
         {
                  //play sound
          }
}
there is something wrong with this because when i suicide the sound plays
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-06-2007 , 16:32   Re: play sound on team kill
Reply With Quote #6

Quote:
Originally Posted by flyeni6 View Post
there is something wrong with this because when i suicide the sound plays
If you are in Terrorist team and make suicide, then you are killed by a Terrorist --> there is nothing wrong!

But maybe you would like to extend this little code...

Try something like this:
Code:
public plugin_int()
{
    register_event("DeathMsg","event_death","a","1>0")
}

plubic event_death(id)
{
    new Killer = read_data(1) 
    new Victim = read_data(2) 
    if(!equal(Killer, Victim))
    {
        new teamA = get_user_team(Killer)
        new teamB = get_user_team(Victim)
        if(teamA == teamB)
        {
            //play sound
        }
    }
}
__________________
regalis is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-06-2007 , 16:48   Re: play sound on team kill
Reply With Quote #7

Quote:
Originally Posted by regalis View Post
If you are in Terrorist team and make suicide, then you are killed by a Terrorist --> there is nothing wrong!

But maybe you would like to extend this little code...

Try something like this:
Code:
public plugin_int()
{
    register_event("DeathMsg","event_death","a","1>0")
}
 
plubic event_death(id)
{
    new Killer = read_data(1) 
    new Victim = read_data(2) 
    if(!equal(Killer, Victim))
    {
        new teamA = get_user_team(Killer)
        new teamB = get_user_team(Victim)
        if(teamA == teamB)
        {
            //play sound
        }
    }
}
Code:
/home/groups/amxmodx/tmp3/textkK55u1.sma(16) : error 035: argument type mismatch (argument 1)
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 05-06-2007 , 16:55   Re: play sound on team kill
Reply With Quote #8

equal native is only for strings.

Code:
if(Victim != Killer)
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-06-2007 , 17:28   Re: play sound on team kill
Reply With Quote #9

Quote:
Originally Posted by teame06 View Post
equal native is only for strings.


Code:
</p><p>if(Victim != Killer)</p><p>
thank you and thanks for the people who helped
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
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 06:39.


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