Raised This Month: $ Target: $400
 0% 

last players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 06-30-2014 , 17:17   Re: last players
Reply With Quote #1

Hey Flick3rR
What about mine? xD

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

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Play sound"
#define VERSION "2.0"
#define AUTHOR "Porta0123"

new const my_sound[] = "jbextreme/nm_goodbadugly.wav"
new bool:duel

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event"DeathMsg" "DeathMsgEvent" "a" );
}

public 
plugin_precache()
{
    
precache_sound(my_sound)
}

public 
DeathMsgEvent()
{
    new 
pnumplayers[32]
    
get_players(playerspnum"a"//get all alive players

    
if(duel && pnum == 1)    //duel ended
    
{
        
duel false
        duelends
(players[0]) //show who won :)
    
}
    else
    {
        if(
pnum == 2//only 2 alives?
        
{
            if(
get_user_team(players[0]) != get_user_team(players[1])) //diferent team?
            
{
                
duel true    // duel started!
                
duelstart(players[0], players[1]) //show who vs who
            
}
        }
        else
        {
            
duel false
        
}
    }
}

stock duelstart(id1id2)
{
    if(
id1 && id2)
    {
        new 
name1[32], name2[32]
        
get_user_name(id1name131)
        
get_user_name(id2name231)
        
        
set_hudmessage(25500, -1.0, -1.006.012.0)
        
show_hudmessage(0"%s vs %s"name1name2)
        
emit_sound(0CHAN_AUTOmy_sound1.0ATTN_NORM0PITCH_NORM)
    }
}

stock duelends(id)
{
    if(
id)
    {
        new 
name1[32]
        
get_user_name(idname131)
        
        
set_hudmessage(25500, -1.0, -1.006.012.0)
        
show_hudmessage(0"%s wons"name1)
        
//emit_sound(0, CHAN_AUTO, my_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
    
}

I can't upload the sound but can be downloaded from jbextreme resources
NikKOo31 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:11.


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