Raised This Month: $ Target: $400
 0% 

Last man standing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Menethil
Senior Member
Join Date: Aug 2011
Old 08-23-2011 , 02:57   Re: Last man standing
Reply With Quote #9

i made this
Code:
 #include <amxmodx>


public plugin_init() 
{
    register_plugin("Last 2 players alive", "1.0", "author")
    register_event("DeathMsg", "death_msg", "a")
    
}

public death_msg(id){ 
    new players_ct[32], players_t[32], ict, ite, name[32] 
    get_players(players_ct,ict,"ae","CT")     
    get_players(players_t,ite,"ae","TERRORIST")     

    //new victim = read_data(2) 
   // new victim_team = get_user_team(victim,"",0) 
     
    if (ict==1&&ite==1)
    { 
        get_user_name(players_ct[0],name,32) 
        set_hudmessage(50,255,0,-1.0,0.30,0, 6.0, 8.0, 1.0, 2.0, 6) 
        show_hudmessage(players_t[0],"1vs1 with %s !",name) 

    get_user_name(players_t[0],name,32) 
    set_hudmessage(50,255,0,-1.0,0.30,0, 6.0, 8.0, 1.0, 2.0, 6) 
    show_hudmessage(players_ct[0],"1vs1 with %s !",name) 

    if(ite==1)
    {
        message_begin ( MSG_ONE, get_user_msgid ( "ScreenFade" ), {0,0,0}, 0 ) ;
        write_short ( 1<<10 ) ;
        write_short ( 1<<10 ) ;
        write_short ( 0x0000 ) ;
        write_byte ( 255 ) ;
        write_byte ( 0 ) ;
        write_byte ( 0 ) ;
        write_byte ( 80 ) ;
        message_end ( ) ;
    }
        
    if(ict==1)
    {
               message_begin ( MSG_ONE, get_user_msgid ( "ScreenFade" ), {0,0,0}, 0 ) ;
        write_short ( 1<<10 ) ;
        write_short ( 1<<10 ) ;
        write_short ( 0x0000 ) ;
        write_byte ( 0 ) ;
        write_byte ( 0 ) ;
        write_byte ( 255 ) ;
        write_byte ( 80 ) ;
        message_end ( ) ;
    }

    if(ict==1&&ite==1)
    {
        client_cmd ( 0 , "spk misc/mysound.wav" )
    }
   }
}

public plugin_precache( )
{ 
    precache_sound ( "misc/mysound.wav" )
}
but seems nothing happens when 1 vs 1 :-s. What could be the error

Last edited by Menethil; 08-23-2011 at 04:26.
Menethil 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:23.


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