HLMOD.HU Forrás Megtekintés
- www.hlmod.hu#include < amxmodx >
#include < amxmisc >
#include < dhudmessage >
#pragma semicolon 1
#define MAX_RESTART 3
new const PLUGIN[] = "Live Plugin";
new const VERSION[] = "2.0";
new const AUTHOR[] = "[ZOF 'X]";
new iXYPos;
new const Float:HUD_XY_POS[ ][ ] =
{
{ -1.0, 0.90 },
{ -1.0, 0.80 },
{ -1.0, 0.70 },
{ -1.0, 0.60 },
{ -1.0, 0.50 },
{ -1.0, 0.40 },
{ -1.0, 0.30 },
{ -1.0, 0.20 },
{ -1.0, 0.10 }
};
new pCvar;
new iNumRounds, bool:GivenLive = false;
public plugin_init( )
{
register_plugin(PLUGIN,VERSION,AUTHOR);
register_event( "HLTV", "Event_NewRound", "a", "1=0", "2=0" );
register_logevent( "logevent_RoundStart", 2, "1=Round_Start" );
pCvar = register_cvar( "amx_auto_live", "1" );
register_clcmd( "say /live", "cmd_live", ADMIN_KICK );
register_clcmd( "say_team /live", "cmd_live", ADMIN_KICK );
register_clcmd( "say .live", "cmd_live", ADMIN_KICK );
register_clcmd( "say_team .live", "cmd_live", ADMIN_KICK );
}
public Event_NewRound( )
{
if( get_pcvar_num( pCvar ) && iNumRounds > 1 && !GivenLive ) {
set_task( 0.1, "NotifyGivingLive" );
set_task( 3.0, "GiveRestartRound", _, _, _, "a", MAX_RESTART );
set_task( 12.0, "ShowHUD_LiveLive" );
set_task( 19.0, "NotifyThat_LIVE" );
GivenLive = true;
}
}
public logevent_RoundStart( )
{
if( !GivenLive ) iNumRounds++;
}
public NotifyGivingLive( )
{
set_dhudmessage( 0, 160, 0, -1.0, 0.44, 0, 1.0, 3.0, 0.2, 0.3, false );
show_dhudmessage( 0, "____________LIVE KEZDODIK 3 MP MULVA!____________" );
}
public NotifyThat_LIVE( )
{
set_dhudmessage( 0, 160, 0, -1.0, 0.44, 0, 1.0, 3.0, 0.2, 0.3, false );
show_dhudmessage( 0, "____________LIVE MEGY GO GO GO____________" );
}
public GiveRestartRound( )
{
server_cmd( "sv_restartround ^"1^"" );
}
public ShowHUD_LiveLive( )
{
set_task( 0.2, "HUD_LiveLive", _, _, _, "a", sizeof( HUD_XY_POS ) * 3 );
}
public HUD_LiveLive( index )
{
if( iXYPos >= sizeof( HUD_XY_POS ) ) iXYPos = 0;
set_dhudmessage( random_num( 0, 255 ), random_num( 0, 255 ), random_num( 0, 255 ), HUD_XY_POS[ iXYPos ][ 0 ], HUD_XY_POS[ iXYPos ][ 1 ], 0, 50.0, 0.4, 0.2, 0.3, false );
show_dhudmessage( index, "[ L I V E ] [ L I V E ] [ L I V E ]" );
iXYPos++;
}
public cmd_live( index, level, cid )
{
if( !cmd_access( index, level, cid, 0 ) ) return PLUGIN_CONTINUE;
iXYPos = 0; GivenLive = true;
set_task( 0.1, "NotifyGivingLive" );
set_task( 3.0, "GiveRestartRound", _, _, _, "a", MAX_RESTART );
set_task( 12.0, "ShowHUD_LiveLive" );
set_task( 19.0, "NotifyThat_LIVE" );
GivenLive = true;
return PLUGIN_CONTINUE;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/