Raised This Month: $ Target: $400
 0% 

Play MP3 to victims teammates only


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 05-13-2010 , 05:40   Play MP3 to victims teammates only
Reply With Quote #1

Right now this play MP3 to the victim only upon death.
I would like this to play to the victim's teammates only.
How to do that?
EDIT: Would like dead people to not be executed by this command either.

PHP Code:
#include <amxmodx>

#define music 4

new mp3list[music][] = 
{
    
"file1.mp3",
    
"file2.mp3",
    
"file3.mp3",
    
"file4.mp3"
}

public 
plugin_init ()
{
    
register_plugin"Sound On Death""1.0""Biscuit" );
    
register_event"DeathMsg""Event_PlayerKilled""a" );
    
register_logevent("round_end_event"2"1=Round_End");
}

public 
round_end_event()
    
client_cmd(0,"mp3 stop")

public 
Event_PlayerKilled ()
{
    
//Get victim
    
new victim read_data(2)

    
//play random mp3 in mp3list to victim
    
new random_num(0,music-1)

    
client_cmd(victim,"mp3 play %s",mp3list[r])


Last edited by Rirre; 05-13-2010 at 07:29.
Rirre 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 03:49.


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