Raised This Month: $ Target: $400
 0% 

Last man standing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Menethil
Senior Member
Join Date: Aug 2011
Old 08-08-2011 , 07:47   Last man standing
Reply With Quote #1

Can anyone tell me how to start this plugin to do the next things


*If u are the last man standing alive ( CT / T ) ur screen to fade for 2 seconds in blue for CT and Red for Tero .. But not compltly blue/red .. just a blue/red fade transparently ..
with a HUD Message that tell`s u are the last man alive.

**If there are just 1 man at each team this mean 1 vs 1 .. the screent o fade for both .. colour depend on each team blue /red .. with the next Permanent HUD.
[1vs1] - Run is not allowed.
somewhere where cant interfere with the gameplaying .. in center-top or vertical left ..

*** and when 1 vs 1 fade and hud message apear to play a song from sounds/misc .. wich can be setted in sma or somehow.
Menethil is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 08-09-2011 , 06:32   Re: Last man standing
Reply With Quote #2

soz for up, but anyone can help me a little ^_^ ?
Menethil is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-09-2011 , 10:23   Re: Last man standing
Reply With Quote #3

Quote:
Originally Posted by Menethil View Post
soz for up, but anyone can help me a little ^_^ ?
Don't bump until 2 weeks have passed since last post.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 08-09-2011 , 06:42   Re: Last man standing
Reply With Quote #4

hook deathmsg to find out if someone is last man alive and you can fade screen with ScreenFade
jimaway is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-19-2011 , 09:59   Re: Last man standing
Reply With Quote #5

No. 2 weeks = 14 days.
It's been 10 days.

You've already gotten support.
Quote:
Originally Posted by jimaway View Post
hook deathmsg to find out if someone is last man alive and you can fade screen with ScreenFade
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 08-19-2011 , 05:46   Re: Last man standing
Reply With Quote #6

Did enought time passed ?Q_Q.
Could anyone help me, or im to .. to get any support :-s
Menethil is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 08-22-2011 , 15:20   Re: Last man standing
Reply With Quote #7

Is this correct till now ?
Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN LastMan
#define VERSION 0.1
#define AUTHOR NeuTroN

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, 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)
        {
            // FadeScreen Red Transparecy here
        }
        
         if(ict==1)
        {
            // FadeScreen Blue Transparecy here
        }

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

public plugin_precache () 
{ 
    precache_sound ( "misc/mysound.wav" )
}
And i still need help with the screen fade, i dont handle this verry well.
Menethil is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 08-22-2011 , 17:58   Re: Last man standing
Reply With Quote #8

Quote:
Originally Posted by Menethil View Post
Is this correct till now ?
Code:
#include <amxmodx>
#include <fakemeta>
 
#define PLUGIN LastMan
#define VERSION 0.1
#define AUTHOR NeuTroN
 
public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, 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)
        {
            // FadeScreen Red Transparecy here
        }
 
         if(ict==1)
        {
            // FadeScreen Blue Transparecy here
        }
 
        if(ict==1&&ite==1)
        {
            client_cmd ( 0 , "spk misc/mysound.wav" )
        }
}
 
public plugin_precache () 
{ 
    precache_sound ( "misc/mysound.wav" )
}
And i still need help with the screen fade, i dont handle this verry well.
PHP Code:
 message_begin(MSG_ONEg_msgScreenFade_id)
 
write_short((1<<12)*2// duration
 
write_short(0// hold time
 
write_short(0x0000// fade type
 
write_byte(1// red
 
write_byte(2// green
 
write_byte(3// blue
 
write_byte(6// alpha
 
message_end() 
.Dare Devil. is offline
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
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 08-23-2011 , 07:02   Re: Last man standing
Reply With Quote #10

he asking about zombie plague , when the last human left and the sound will come out like the sound that we have choose in the plugin.
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.

Last edited by JoKeR LauGh; 08-23-2011 at 07:02. Reason: +
JoKeR LauGh 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 03:23.


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