Cerere plugin Freeze Time Furien

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times

11 Aug 2013, 01:46

Salut, as dori si eu pluginul acela cu timer si freeze cu sunet la inceput de runda dar care sa aiba clip de fiecare secunda , daca se poate >:D<
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
RoyalServer
User avatar
-Turbo-
Membru, skill +4
Membru, skill +4
Posts: 1664
Joined: 11 Nov 2012, 01:28
Detinator Steam: Da
CS Status: Bored !
Detinator server CS: Da
SteamID: kingforbidden
Reputatie: Utilizator neserios ( tepar )
Restrictie moderator
Ban scos ( achitat )
Nume anterior: Turbo19973
Location: Botosani
Has thanked: 49 times
Been thanked: 212 times

11 Aug 2013, 03:57

| Afiseaza codul
#include < amxmodx >

#pragma semicolon 1

#define PLUGIN "Furien Invasion "
#define VERSION "1.0"
#define AUTHOR "Askhanar"

new const InvasionSounds[ 6 ][ ] = {
	
	"timestart",
	"timer01",
	"timer02",
	"timer03",
	"timer04",
	"timer05"
};

new SecondsUntillInvasion = 6;
new mp_freezetime;

new SyncHudMessage;

public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, AUTHOR );
	
	register_event( "HLTV", "ev_HookRoundStart", "a", "1=0", "2=0" );
	register_event( "SendAudio","ev_TerroWin","a","2=%!MRAD_terwin");
	register_event( "SendAudio","ev_CounterWin","a","2=%!MRAD_ctwin");
	
	mp_freezetime = get_cvar_pointer( "mp_freezetime" );
	set_pcvar_num( mp_freezetime, 5 );
	SyncHudMessage = CreateHudSyncObj( );
}

public plugin_precache( )
{
	new soundpath[ 64 ];
	for( new i = 0 ; i < 6 ; i++ )
	{
		formatex( soundpath, sizeof ( soundpath ) -1 , "misc/%s.wav", InvasionSounds[ i ] );
		precache_sound( soundpath );
	}
}


public ev_HookRoundStart( )
{
	
	SecondsUntillInvasion = 5;
	set_task( 0.1, "CountDown" );
}
public CountDown( )
{
	if( SecondsUntillInvasion > 0 )
	{
		TerroTeamEffects( );
		CounterTeamEffects( );
		
		set_hudmessage( 0, 255, 0, -1.0, 0.29, 0, 0.0, 1.0, 0.0, 1.0, 4);
		client_cmd(0,"spk misc/%s",InvasionSounds[ SecondsUntillInvasion ] );
		static const Seconds[6][ ] = { "","o","doua","trei","patru","cinci" };
		ShowSyncHudMsg( 0, SyncHudMessage, "Furienii vor invada planeta in %s secund%s !",Seconds[ SecondsUntillInvasion ] , SecondsUntillInvasion  == 1? "a" : "e");

	}
	
	else if( SecondsUntillInvasion <= 0 )
	{
		set_hudmessage( 255, 0, 0, -1.0, 0.29, 0, 0.0, 1.0, 0.0, 1.0, 4);
		ShowSyncHudMsg( 0, SyncHudMessage, "Furienii au invadat planeta !");
		client_cmd(0,"spk misc/%s",InvasionSounds[ SecondsUntillInvasion ] );
		return 1;
	}
	
	SecondsUntillInvasion -= 1;
	set_task( 1.0, "CountDown");
	
	return 0;
}
public ev_TerroWin( )
{
	set_hudmessage( 255, 255, 255, -1.0, 0.45, 0, 0.0, 2.0, 0.0, 5.0, 4);
	ShowSyncHudMsg( 0, SyncHudMessage, "Furienii au castigat !^nPlaneta a fost cucerita!" );

	new iPlayers[ 32 ];
	new iPlayersNum;

	get_players( iPlayers, iPlayersNum, "c" );		
	for( new i = 0 ; i < iPlayersNum ; i++ )
	{
		if( is_user_connected( iPlayers[ i ] ) )
		{
			ShakeScreen( iPlayers[ i ], 3.0 );
			FadeScreen( iPlayers[ i ] , 3.0, 230, 0, 0, 160 );
		}
	}
}
public ev_CounterWin( )
{
	set_hudmessage( 255, 255, 25, -1.0, 0.45, 0, 0.0, 2.0, 0.0, 5.0, 4);
	ShowSyncHudMsg( 0, SyncHudMessage, "AntiFurienii au castigat !^nPlaneta a fost salvata !" );

	new iPlayers[ 32 ];
	new iPlayersNum;

	get_players( iPlayers, iPlayersNum, "c" );		
	for( new i = 0 ; i < iPlayersNum ; i++ )
	{
		if( is_user_connected( iPlayers[ i ] ) )
		{
			
			ShakeScreen( iPlayers[ i ], 3.0 );
			FadeScreen( iPlayers[ i ] , 3.0, 0, 0, 230, 160 );

		}
	}
}

public TerroTeamEffects( )
{
	new iPlayers[ 32 ];
	new iPlayersNum;
	
	get_players(iPlayers, iPlayersNum, "ae", "TERRORIST");
	
	for( new i = 0 ; i < iPlayersNum ; i++ )
	{
		if( is_user_connected( iPlayers[ i ] ) )
		{	
			ShakeScreen( iPlayers[ i ], 0.7 );
			FadeScreen( iPlayers[ i ] , 0.5, 230, 0, 0, 160 );
		}
	}
}
public CounterTeamEffects( )
{
	new iPlayers[ 32 ];
	new iPlayersNum;
	
	get_players( iPlayers, iPlayersNum, "ae", "CT" );
	
	for( new i = 0 ; i < iPlayersNum ; i++ )
	{
		if( is_user_connected( iPlayers[ i ] ) )
		{	
			ShakeScreen( iPlayers[ i ], 0.7 );
			FadeScreen( iPlayers[ i ] , 0.5, 0, 0, 230, 160 );
		}
	}
}

public ShakeScreen( id, const Float:seconds )
{
	message_begin( MSG_ONE, get_user_msgid( "ScreenShake" ), { 0, 0, 0 }, id );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( 1<<13 );
	message_end( );
	
}

public FadeScreen( id, const Float:seconds, const red, const green, const blue, const alpha )
{      
	message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), _, id );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( 0x0000 );
	write_byte( red );
	write_byte( green );
	write_byte( blue );
	write_byte( alpha );
	message_end( );

}
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times

11 Aug 2013, 11:48

Iti multumesc mult de tot :*
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests