Raised This Month: $51 Target: $400
 12% 

Remaining CT = slay


Post New Thread Reply   
 
Thread Tools Display Modes
Stefanos
Senior Member
Join Date: May 2020
Old 08-18-2020 , 07:34   Re: Remaining CT = slay
Reply With Quote #91

yeah just like that ! with colorchat!!!
Stefanos is offline
Stefanos
Senior Member
Join Date: May 2020
Old 08-18-2020 , 07:35   Re: Remaining CT = slay
Reply With Quote #92

[Fusion - Deathrun] is green and other is yellow and number for slay time is blue !!
Stefanos is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-18-2020 , 20:23   Re: Remaining CT = slay
Reply With Quote #93

Works on 1.9's native color chat.
PHP Code:

#include <amxmodx>

new const Version[] = "0.8";

#define FFADE_IN 0x0000
#define FFADE_OUT 0x0001
#define FADE_TYPE FFADE_OUT

new g_pSlayNoBots g_pSlayWithBots g_pSlayDelay g_pPluginStartDelay;
new 
g_Bots g_iSeconds g_iSlayID;
new 
g_iRoundStartTime;
new 
g_msgScreenFade;

public 
plugin_init() 
{
    
register_plugin"Slay CT" Version "bugsy" );

    
register_event"HLTV" "NewRound" "a" "1=0" "2=0" );
    
register_logevent"RoundEnd" "1=Round_End" );
    
    
g_msgScreenFade get_user_msgid"ScreenFade" );
    
    
g_pSlayNoBots register_cvar"sct_nobotslay" "3" );
    
g_pSlayWithBots register_cvar"sct_botslay" "5" );
    
g_pSlayDelay register_cvar"sct_slaydelay" "5" );
    
g_pPluginStartDelay register_cvar"sct_rounddelayseconds" "90" );
    
    
set_task1.0 "SlayCheck" 139457 , .flags="b" );
}

public 
client_putinserverid )
{
    
g_Bots |= ( is_user_botid ) << ( id 31 ) );
}

public 
client_disconnectid )
{
    
g_Bots &= ~( << ( id 31 ) );
    
    if ( 
id == g_iSlayID )
    {
        
remove_taskg_iSlayID );
        
g_iSlayID 0;
    }
}

public 
NewRound()
{
    
g_iRoundStartTime get_systime();
}

public 
RoundEnd()
{
    
remove_taskg_iSlayID );
    
g_iSlayID 0;
}

public 
SlayCheck()
{
    new 
iPlayers32 ] , iCTNum iTNum szName33 ];
    
    if ( !
g_iSlayID && ( get_systime() - g_iRoundStartTime ) >= get_pcvar_numg_pPluginStartDelay ) && ( get_playersnum() > get_pcvar_numg_Bots g_pSlayWithBots g_pSlayNoBots ) ) )
    {
        
get_playersiPlayers iTNum "ae" "TERRORIST" );
        
get_playersiPlayers iCTNum "ae" "CT" );
        
        if ( ( 
iCTNum == ) && iTNum )
        {
            
get_user_name( ( g_iSlayID iPlayers] ) , szName charsmaxszName ) );
            
set_task1.0 "CountdownToSlay" g_iSlayID , .flags="a" , .repeat=( g_iSeconds get_pcvar_numg_pSlayDelay ) + ) );
            
client_print_colorg_iSlayID "^4[Fusion - Deathrun] ^1%s will be slayed in ^3%d ^1second%s." szName g_iSeconds g_iSeconds "s" "" );
            
ScreenFadeg_iSlayID );
        }
    }
}

public 
CountdownToSlayid )
{
    if ( --
g_iSeconds == 
    {
        
user_killid );
        
client_print_colorid "^4[Fusion - Deathrun] ^1Slayed for being AFK." );
        
g_iSlayID 0;
    }
}

public 
ScreenFadeid )
{
    new 
iUnits clamp( ( ( get_pcvar_numg_pSlayDelay ) + ) * ( << 12 ) ) , 0xFFFF );
    
    
message_beginMSG_ONE_UNRELIABLE g_msgScreenFade _id );
    
write_shortiUnits );
    
write_short);
    
write_shortFADE_TYPE );
    
write_byte255 );
    
write_byte);
    
write_byte);
    
write_byte100 );
    
message_end( );

__________________

Last edited by Bugsy; 08-28-2020 at 20:48.
Bugsy is offline
Cirovic
Senior Member
Join Date: Sep 2019
Old 08-19-2020 , 09:22   Re: Remaining CT = slay
Reply With Quote #94

what about other plugin, can u combine them ?!
Cirovic is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-19-2020 , 12:49   Re: Remaining CT = slay
Reply With Quote #95

Quote:
Originally Posted by Cirovic View Post
what about other plugin, can u combine them ?!
https://forums.alliedmods.net/showpo...9&postcount=51
__________________
Bugsy is offline
Stefanos
Senior Member
Join Date: May 2020
Old 08-19-2020 , 14:43   Re: Remaining CT = slay
Reply With Quote #96

okay, so now i dont understand anything. i see there is some spectator trasnfer and i dont need that cuz im full always 32/32, so i dont need for spectator.. i dont see text message for slaying when one ct stay last.. im really confused
Stefanos is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-19-2020 , 18:28   Re: Remaining CT = slay
Reply With Quote #97

Read through that thread to see what the plugin does.
__________________
Bugsy is offline
Stefanos
Senior Member
Join Date: May 2020
Old 08-19-2020 , 19:01   Re: Remaining CT = slay
Reply With Quote #98

bro can you tell me what to do? im really confused that was 2 plugins now its 1 right? but there is no [Fusion - Deathrun] player will be slayed in 5 seconds. can you please help me
Stefanos is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-19-2020 , 19:37   Re: Remaining CT = slay
Reply With Quote #99

Just run both plugins
__________________
Bugsy is offline
Stefanos
Senior Member
Join Date: May 2020
Old 08-23-2020 , 18:24   Re: Remaining CT = slay
Reply With Quote #100

hey bugsy.. last request for this..

can u add when countdown starts RED FADE will appear on player screen.. feed only for player that is last CT

#include <amxmodx>

new const Version[] = "0.7";

new g_pSlayNoBots , g_pSlayWithBots , g_pSlayDelay , g_pPluginStartDelay;
new g_Bots , g_iSeconds , g_iSlayID;
new g_iRoundStartTime;

public plugin_init()
{
register_plugin( "Slay CT" , Version , "bugsy" );

register_event( "HLTV" , "NewRound" , "a" , "1=0" , "2=0" );
register_logevent( "RoundEnd" , 2 , "1=Round_End" );

g_pSlayNoBots = register_cvar( "sct_nobotslay" , "3" );
g_pSlayWithBots = register_cvar( "sct_botslay" , "5" );
g_pSlayDelay = register_cvar( "sct_slaydelay" , "5" );
g_pPluginStartDelay = register_cvar( "sct_rounddelayseconds" , "90" );

set_task( 1.0 , "SlayCheck" , 139457 , .flags="b" );
}

public client_putinserver( id )
{
g_Bots |= ( is_user_bot( id ) << ( id & 31 ) );
}

public client_disconnect( id )
{
g_Bots &= ~( 1 << ( id & 31 ) );

if ( id == g_iSlayID )
{
remove_task( g_iSlayID );
g_iSlayID = 0;
}
}

public NewRound()
{
g_iRoundStartTime = get_systime();
}

public RoundEnd()
{
remove_task( g_iSlayID );
g_iSlayID = 0;
}

public SlayCheck()
{
new iPlayers[ 32 ] , iCTNum , iTNum , szName[ 33 ];

if ( !g_iSlayID && ( get_systime() - g_iRoundStartTime ) >= get_pcvar_num( g_pPluginStartDelay ) && ( get_playersnum() > get_pcvar_num( g_Bots ? g_pSlayWithBots : g_pSlayNoBots ) ) )
{
get_players( iPlayers , iTNum , "ae" , "TERRORIST" );
get_players( iPlayers , iCTNum , "ae" , "CT" );

if ( ( iCTNum == 1 ) && iTNum )
{
get_user_name( ( g_iSlayID = iPlayers[ 0 ] ) , szName , charsmax( szName ) );
set_task( 1.0 , "CountdownToSlay" , g_iSlayID , .flags="a" , .repeat=( g_iSeconds = get_pcvar_num( g_pSlayDelay ) + 1 ) );
client_print_color( 0 , g_iSlayID , "^4[Fusion - Deathrun] ^1%s will be slayed in ^3%d ^1second%s." , szName , g_iSeconds - 1 , g_iSeconds > 1 ? "s" : "" );
}
}
}

public CountdownToSlay( id )
{
if ( --g_iSeconds == 0 )
{
user_kill( id );
client_print_color( id , 0 , "^4[Fusion - Deathrun] ^1Slayed for being AFK." );
g_iSlayID = 0;
}
}
Stefanos 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 15:50.


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