Plugin invasion furien diferit

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 .
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

08 Jun 2014, 15:59

Descriere plugin cerut:Un plugin pentru modul furien.Cel de la inceputul rundei cand are freeze si ecranul este rosu/albastru cu sunetele si mesajle hud.As vrea unul care nu da crash si care de exemplu cand are loc ultimul kill sau explodeaza bomba sa se albeasca exranul dar nu deodata ca la blind treptat(nu intr-o fractiune de secunda sa fie alb deodata,sa fie 1-2 gen ceata din ce in ce mai groasa.
Alte informatii:As vrea sa pastrati aceleasi mesaje hud si aceleasi sunete :time 1,time 2 etc.
RoyalServer
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2811
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 244 times
Been thanked: 129 times
Contact:

08 Jun 2014, 21:09

Not tested... | Afiseaza codul
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < engine >

#define PLUGIN "Furien Utilities"
#define VERSION "0.8.5"

#define HEALTH		40
#define MAX_LIGHT_POINTS 3
new const InvasionSounds[ 6 ][ ] = {
	
	"start_round",
	"timer01",
	"timer02",
	"timer03",
	"timer04",
	"timer05"
};
#define FFADE_IN		0x0000		// Just here so we don't pass 0 into the function
#define FFADE_OUT		0x0001		// Fade out (not in)
#define FFADE_MODULATE		0x0002		// Modulate (don't blend)
#define FFADE_STAYOUT		0x0004		// ignores the duration, stays faded out until new ScreenFade message received

enum {
	Red,
	Green,
	Blue
};

new Sound[ ] = "misc/HeartBeat.wav";

new Float:g_fBlockC4;
new bool:CanPlant = false;

new SecondsUntillInvasion = 6;
new mp_freezetime;
new CvarFadeTime, CvarColor
new SyncHudMessage;
new cvar_spawnblock;
new const soundbmb[] = "misc/bmb.wav";
public plugin_init( )
{

	register_plugin( PLUGIN, VERSION, "Aragon* && sPuf?");

	cvar_spawnblock = register_cvar( "amx_nobmbplant", "60.0" );
	CvarFadeTime = register_cvar("amx_countdown_fadetime", "0.5")
	CvarColor = register_cvar("amx_countdown_color", "255000000")
	
	register_event( "HLTV", "ev_HookRoundStart", "a", "1=0", "2=0" );
	register_event( "TextMsg", "evBombMessage", "b", "2=#C4_Plant_At_Bomb_Spot" ); 
	
	RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_c4", "hamPrimaryAttackC4" );
	
	mp_freezetime = get_cvar_pointer( "mp_freezetime" );
	set_pcvar_num( mp_freezetime, 5 );
	SyncHudMessage = CreateHudSyncObj( );
	
	//Edited by DaNNe.
	register_message(get_user_msgid("TextMsg"), "MSG_TextMessage")
	// End...
	
	set_task( 1.0, "CheckBombTime", _, _, _, "b", 0 );
}

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 );
	}
	precache_sound( Sound );
	precache_sound(soundbmb);
	
}

public ev_HookRoundStart( )
{
	set_lights( "e" );
	
	g_fBlockC4 = 0.0;
	g_fBlockC4 = get_gametime( );
	CanPlant = false;
	
	SecondsUntillInvasion = 5;
	set_task( 0.1, "CountDown" );
}

public CountDown( )
{
	new iPlayers[ 32 ];
	new iPlayersNum;
	get_players( iPlayers, iPlayersNum, "a" );
	if( SecondsUntillInvasion > 0 )
	{
		
		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 lumea in %s secund%s!",Seconds[ SecondsUntillInvasion ] , SecondsUntillInvasion  == 1? "a" : "e");
		for(new i = 0 ; i < iPlayersNum ; i++) {
			if(is_user_connected(iPlayers)) {
				Effect2(iPlayers)
			}
		}	
	}
	
	else if( SecondsUntillInvasion <= 0 )
	{
		set_hudmessage( 255, 0, 0, -1.0, 0.29, 0, 0.0, 5.5, 0.0, 1.0, 4);
		ShowSyncHudMsg( 0, SyncHudMessage, "Furienii au invadat lumea!");
		
		client_cmd(0,"spk misc/%s",InvasionSounds[ SecondsUntillInvasion ] );
		for(new i = 0 ; i < iPlayersNum ; i++) {
			if(is_user_connected(iPlayers)) {
				Effect(iPlayers)
			}
		}	
		return 1;
	}
	
	SecondsUntillInvasion -= 1;
	set_task( 1.0, "CountDown");
	
	return 0;
}

public evBombMessage( id ) 
{ 
	if( CanPlant == false ) 
	{
		client_print( id, print_center, "" );
	}
}

// Edited By DaNNe.
public MSG_TextMessage() {
	static TextMsg[22];
	get_msg_arg_string(2, TextMsg, charsmax(TextMsg))
	if(equal(TextMsg, "#Terrorists_Win")) {
		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Furienii au distrus Universul !")
		ScreenFade(0, 0, 0)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#CTs_Win")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au salvat Universul !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Bomb_Defused")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa dezamorseze bomba !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Target_Bombed")) {
		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Bomba a explodat. Universul a fost distrus !")
		ScreenFade(0, 0, 0)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Target_Saved")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa salveze locurile in care putea fi plantata bomba !")
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public ScreenFade(red, green, blue) {
	message_begin(MSG_BROADCAST, get_user_msgid("ScreenFade"));
	write_short((1<<12)*4);
	write_short((1<<12)*1);
	write_short(0x0001);
	write_byte(red);
	write_byte(green);
	write_byte(blue);
	write_byte(250);
	message_end();
}
// End...

public hamPrimaryAttackC4( iEnt )
{ 
	
	if( CanPlant == false )
	{
		new id = pev( iEnt, pev_owner );
		set_hudmessage( 0, 255, 0, -1.0, 0.45, 0, 0.0, 8.0, 0.0, 0.1, 4 );
		ShowSyncHudMsg( id, SyncHudMessage, "Furienii pot planta bomba doar peste %.1f secunde!",   get_pcvar_num( cvar_spawnblock ) - ( get_gametime( ) - g_fBlockC4 ) );
		return HAM_SUPERCEDE;
	}
	
	return HAM_IGNORED; 
}

public CheckBombTime( )
{
	if( CanPlant == false )
	{
		if( ( get_gametime( ) - g_fBlockC4 ) > float( get_pcvar_num( cvar_spawnblock ) ) )
		{
			set_hudmessage( 255, 0, 0, -1.0, 0.45, 0, 0.0, 8.5, 0.0, 5.0, 4 );
//			ShowSyncHudMsg( 0, SyncHudMessage, "Furienii pot planta bomba!" );
			CanPlant = true;
			
			set_lights( "d" );
			client_cmd(0,"spk %s",soundbmb);
		}
	}
	
	new iPlayers[ 32 ];
	new iPlayersNum;
	
	get_players(iPlayers, iPlayersNum, "aceh", "TERRORIST");		
	for( new i = 0 ; i < iPlayersNum ; i++ )
	{
		if( is_user_alive( iPlayers[ i ] ) && is_user_connected( iPlayers[ i ] ) )
		{
			if( get_user_health( iPlayers[ i ] ) <= HEALTH )
			{
				ShakeScreen( iPlayers[ i ], 0.9 );
				emit_sound( iPlayers[ i ], CHAN_STATIC, Sound, 0.2, ATTN_IDLE, 0, PITCH_NORM );
				
			}
		}
	}
	
}

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 Effect(id) {
	UTIL_ScreenFade(id, get_color(CvarColor), get_pcvar_float(CvarFadeTime), get_pcvar_float(CvarFadeTime), 125)
	new shock[3]
	shock[0] = 2
	shock[1] = 2
	shock[2] = 2
	message_begin(MSG_ONE, get_user_msgid("ScreenShake"), _, id)
	write_short((1<<12)*shock[0])
	write_short((1<<12)*shock[1])
	write_short((1<<12)*shock[2])
	message_end()
}

get_color(pcvar) {
	new iColor[3], szColor[10]
	get_pcvar_string(pcvar, szColor, charsmax(szColor))
	new c = str_to_num(szColor)
	
	iColor[Red] = c / 1000000
	c %= 1000000
	iColor[Green] = c / 1000
	iColor[Blue] = c % 1000
	
	return iColor
}

public Effect2(id) {
	UTIL_ScreenFade(id, get_color2(CvarColor), get_pcvar_float(CvarFadeTime), get_pcvar_float(CvarFadeTime), 125)
	new shock[3]
	shock[0] = 2
	shock[1] = 2
	shock[2] = 2
	message_begin(MSG_ONE, get_user_msgid("ScreenShake"), _, id)
	write_short((1<<12)*shock[0])
	write_short((1<<12)*shock[1])
	write_short((1<<12)*shock[2])
	message_end()
}

get_color2(pcvar) {
	new iColor[3], szColor[10]
	get_pcvar_string(pcvar, szColor, charsmax(szColor))
	new c = str_to_num(szColor)
	
	iColor[Red] = c / 1000
	iColor[Green] = c / 100000
	c %= 100000
	iColor[Blue] = c % 1000
	
	return iColor
}

stock FixedUnsigned16(Float:flValue, iScale) {
	new iOutput;
	
	iOutput = floatround(flValue * iScale);
	if ( iOutput < 0 )
		iOutput = 0;
	
	if ( iOutput > 0xFFFF )
		iOutput = 0xFFFF;
	return iOutput;
}

stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=FFADE_IN,bool:bReliable=false,bool:bExternal=false) {
	if( id && !is_user_connected(id))
		return;
	
	new iFadeTime;
	if( flFxTime == -1.0 ) {
		iFadeTime = 4;
	}
	else {
		iFadeTime = FixedUnsigned16( flFxTime , 1<<12 );
	}
	
	static gmsgScreenFade;
	if( !gmsgScreenFade ) {
		gmsgScreenFade = get_user_msgid("ScreenFade");
	}
	
	new MSG_DEST;
	if( bReliable ) {
		MSG_DEST = id ? MSG_ONE : MSG_ALL;
	}
	else {
		MSG_DEST = id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST;
	}
	
	if( bExternal ) {
		emessage_begin( MSG_DEST, gmsgScreenFade, _, id );
		ewrite_short( iFadeTime );
		ewrite_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
		ewrite_short( iFlags );
		ewrite_byte( iColor[Red] );
		ewrite_byte( iColor[Green] );
		ewrite_byte( iColor[Blue] );
		ewrite_byte( iAlpha );
		emessage_end();
	}
	else {
		message_begin( MSG_DEST, gmsgScreenFade, _, id );
		write_short( iFadeTime );
		write_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
		write_short( iFlags );
		write_byte( iColor[Red] );
		write_byte( iColor[Green] );
		write_byte( iColor[Blue] );
		write_byte( iAlpha );
		message_end();
	}
}

stock UTIL_FadeToBlack(id,Float:fxtime=3.0,bool:bReliable=false,bool:bExternal=false) {
	UTIL_ScreenFade(id, _, fxtime, fxtime, 255, FFADE_OUT|FFADE_STAYOUT,bReliable,bExternal);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

08 Jun 2014, 22:02

DaNNe. wrote:
Not tested... | Afiseaza codul
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < engine >

#define PLUGIN "Furien Utilities"
#define VERSION "0.8.5"

#define HEALTH		40
#define MAX_LIGHT_POINTS 3
new const InvasionSounds[ 6 ][ ] = {
	
	"start_round",
	"timer01",
	"timer02",
	"timer03",
	"timer04",
	"timer05"
};
#define FFADE_IN		0x0000		// Just here so we don't pass 0 into the function
#define FFADE_OUT		0x0001		// Fade out (not in)
#define FFADE_MODULATE		0x0002		// Modulate (don't blend)
#define FFADE_STAYOUT		0x0004		// ignores the duration, stays faded out until new ScreenFade message received

enum {
	Red,
	Green,
	Blue
};

new Sound[ ] = "misc/HeartBeat.wav";

new Float:g_fBlockC4;
new bool:CanPlant = false;

new SecondsUntillInvasion = 6;
new mp_freezetime;
new CvarFadeTime, CvarColor
new SyncHudMessage;
new cvar_spawnblock;
new const soundbmb[] = "misc/bmb.wav";
public plugin_init( )
{

	register_plugin( PLUGIN, VERSION, "Aragon* && sPuf?");

	cvar_spawnblock = register_cvar( "amx_nobmbplant", "60.0" );
	CvarFadeTime = register_cvar("amx_countdown_fadetime", "0.5")
	CvarColor = register_cvar("amx_countdown_color", "255000000")
	
	register_event( "HLTV", "ev_HookRoundStart", "a", "1=0", "2=0" );
	register_event( "TextMsg", "evBombMessage", "b", "2=#C4_Plant_At_Bomb_Spot" ); 
	
	RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_c4", "hamPrimaryAttackC4" );
	
	mp_freezetime = get_cvar_pointer( "mp_freezetime" );
	set_pcvar_num( mp_freezetime, 5 );
	SyncHudMessage = CreateHudSyncObj( );
	
	//Edited by DaNNe.
	register_message(get_user_msgid("TextMsg"), "MSG_TextMessage")
	// End...
	
	set_task( 1.0, "CheckBombTime", _, _, _, "b", 0 );
}

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 );
	}
	precache_sound( Sound );
	precache_sound(soundbmb);
	
}

public ev_HookRoundStart( )
{
	set_lights( "e" );
	
	g_fBlockC4 = 0.0;
	g_fBlockC4 = get_gametime( );
	CanPlant = false;
	
	SecondsUntillInvasion = 5;
	set_task( 0.1, "CountDown" );
}

public CountDown( )
{
	new iPlayers[ 32 ];
	new iPlayersNum;
	get_players( iPlayers, iPlayersNum, "a" );
	if( SecondsUntillInvasion > 0 )
	{
		
		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 lumea in %s secund%s!",Seconds[ SecondsUntillInvasion ] , SecondsUntillInvasion  == 1? "a" : "e");
		for(new i = 0 ; i < iPlayersNum ; i++) {
			if(is_user_connected(iPlayers)) {
				Effect2(iPlayers)
			}
		}	
	}
	
	else if( SecondsUntillInvasion <= 0 )
	{
		set_hudmessage( 255, 0, 0, -1.0, 0.29, 0, 0.0, 5.5, 0.0, 1.0, 4);
		ShowSyncHudMsg( 0, SyncHudMessage, "Furienii au invadat lumea!");
		
		client_cmd(0,"spk misc/%s",InvasionSounds[ SecondsUntillInvasion ] );
		for(new i = 0 ; i < iPlayersNum ; i++) {
			if(is_user_connected(iPlayers)) {
				Effect(iPlayers)
			}
		}	
		return 1;
	}
	
	SecondsUntillInvasion -= 1;
	set_task( 1.0, "CountDown");
	
	return 0;
}

public evBombMessage( id ) 
{ 
	if( CanPlant == false ) 
	{
		client_print( id, print_center, "" );
	}
}

// Edited By DaNNe.
public MSG_TextMessage() {
	static TextMsg[22];
	get_msg_arg_string(2, TextMsg, charsmax(TextMsg))
	if(equal(TextMsg, "#Terrorists_Win")) {
		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Furienii au distrus Universul !")
		ScreenFade(0, 0, 0)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#CTs_Win")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au salvat Universul !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Bomb_Defused")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa dezamorseze bomba !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Target_Bombed")) {
		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Bomba a explodat. Universul a fost distrus !")
		ScreenFade(0, 0, 0)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Target_Saved")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa salveze locurile in care putea fi plantata bomba !")
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public ScreenFade(red, green, blue) {
	message_begin(MSG_BROADCAST, get_user_msgid("ScreenFade"));
	write_short((1<<12)*4);
	write_short((1<<12)*1);
	write_short(0x0001);
	write_byte(red);
	write_byte(green);
	write_byte(blue);
	write_byte(250);
	message_end();
}
// End...

public hamPrimaryAttackC4( iEnt )
{ 
	
	if( CanPlant == false )
	{
		new id = pev( iEnt, pev_owner );
		set_hudmessage( 0, 255, 0, -1.0, 0.45, 0, 0.0, 8.0, 0.0, 0.1, 4 );
		ShowSyncHudMsg( id, SyncHudMessage, "Furienii pot planta bomba doar peste %.1f secunde!",   get_pcvar_num( cvar_spawnblock ) - ( get_gametime( ) - g_fBlockC4 ) );
		return HAM_SUPERCEDE;
	}
	
	return HAM_IGNORED; 
}

public CheckBombTime( )
{
	if( CanPlant == false )
	{
		if( ( get_gametime( ) - g_fBlockC4 ) > float( get_pcvar_num( cvar_spawnblock ) ) )
		{
			set_hudmessage( 255, 0, 0, -1.0, 0.45, 0, 0.0, 8.5, 0.0, 5.0, 4 );
//			ShowSyncHudMsg( 0, SyncHudMessage, "Furienii pot planta bomba!" );
			CanPlant = true;
			
			set_lights( "d" );
			client_cmd(0,"spk %s",soundbmb);
		}
	}
	
	new iPlayers[ 32 ];
	new iPlayersNum;
	
	get_players(iPlayers, iPlayersNum, "aceh", "TERRORIST");		
	for( new i = 0 ; i < iPlayersNum ; i++ )
	{
		if( is_user_alive( iPlayers[ i ] ) && is_user_connected( iPlayers[ i ] ) )
		{
			if( get_user_health( iPlayers[ i ] ) <= HEALTH )
			{
				ShakeScreen( iPlayers[ i ], 0.9 );
				emit_sound( iPlayers[ i ], CHAN_STATIC, Sound, 0.2, ATTN_IDLE, 0, PITCH_NORM );
				
			}
		}
	}
	
}

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 Effect(id) {
	UTIL_ScreenFade(id, get_color(CvarColor), get_pcvar_float(CvarFadeTime), get_pcvar_float(CvarFadeTime), 125)
	new shock[3]
	shock[0] = 2
	shock[1] = 2
	shock[2] = 2
	message_begin(MSG_ONE, get_user_msgid("ScreenShake"), _, id)
	write_short((1<<12)*shock[0])
	write_short((1<<12)*shock[1])
	write_short((1<<12)*shock[2])
	message_end()
}

get_color(pcvar) {
	new iColor[3], szColor[10]
	get_pcvar_string(pcvar, szColor, charsmax(szColor))
	new c = str_to_num(szColor)
	
	iColor[Red] = c / 1000000
	c %= 1000000
	iColor[Green] = c / 1000
	iColor[Blue] = c % 1000
	
	return iColor
}

public Effect2(id) {
	UTIL_ScreenFade(id, get_color2(CvarColor), get_pcvar_float(CvarFadeTime), get_pcvar_float(CvarFadeTime), 125)
	new shock[3]
	shock[0] = 2
	shock[1] = 2
	shock[2] = 2
	message_begin(MSG_ONE, get_user_msgid("ScreenShake"), _, id)
	write_short((1<<12)*shock[0])
	write_short((1<<12)*shock[1])
	write_short((1<<12)*shock[2])
	message_end()
}

get_color2(pcvar) {
	new iColor[3], szColor[10]
	get_pcvar_string(pcvar, szColor, charsmax(szColor))
	new c = str_to_num(szColor)
	
	iColor[Red] = c / 1000
	iColor[Green] = c / 100000
	c %= 100000
	iColor[Blue] = c % 1000
	
	return iColor
}

stock FixedUnsigned16(Float:flValue, iScale) {
	new iOutput;
	
	iOutput = floatround(flValue * iScale);
	if ( iOutput < 0 )
		iOutput = 0;
	
	if ( iOutput > 0xFFFF )
		iOutput = 0xFFFF;
	return iOutput;
}

stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=FFADE_IN,bool:bReliable=false,bool:bExternal=false) {
	if( id && !is_user_connected(id))
		return;
	
	new iFadeTime;
	if( flFxTime == -1.0 ) {
		iFadeTime = 4;
	}
	else {
		iFadeTime = FixedUnsigned16( flFxTime , 1<<12 );
	}
	
	static gmsgScreenFade;
	if( !gmsgScreenFade ) {
		gmsgScreenFade = get_user_msgid("ScreenFade");
	}
	
	new MSG_DEST;
	if( bReliable ) {
		MSG_DEST = id ? MSG_ONE : MSG_ALL;
	}
	else {
		MSG_DEST = id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST;
	}
	
	if( bExternal ) {
		emessage_begin( MSG_DEST, gmsgScreenFade, _, id );
		ewrite_short( iFadeTime );
		ewrite_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
		ewrite_short( iFlags );
		ewrite_byte( iColor[Red] );
		ewrite_byte( iColor[Green] );
		ewrite_byte( iColor[Blue] );
		ewrite_byte( iAlpha );
		emessage_end();
	}
	else {
		message_begin( MSG_DEST, gmsgScreenFade, _, id );
		write_short( iFadeTime );
		write_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
		write_short( iFlags );
		write_byte( iColor[Red] );
		write_byte( iColor[Green] );
		write_byte( iColor[Blue] );
		write_byte( iAlpha );
		message_end();
	}
}

stock UTIL_FadeToBlack(id,Float:fxtime=3.0,bool:bReliable=false,bool:bExternal=false) {
	UTIL_ScreenFade(id, _, fxtime, fxtime, 255, FFADE_OUT|FFADE_STAYOUT,bReliable,bExternal);
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Pluginul merge,nu are erori nici la compilare nici in logs dar(da exista un dar)
1.La inceputul rundei,ecranul se face verde,as vrea rosu la t si albastru la ct.
2.Ceata alba de la final nu apare deloc.
3.Nu as vrea sunetul ala cu "Pune bomba sau te ingrop"
P.S:imi place efectul ala de dark >:D<
Last edited by |NGU|Anonymus on 08 Jun 2014, 23:00, edited 1 time in total.
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2811
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 244 times
Been thanked: 129 times
Contact:

08 Jun 2014, 22:37

:-" | Afiseaza codul
#include <amxmodx>

#define PLUGIN "Furien Invasion :-?"
#define VERSION "1.0"
#define AUTHOR "Askhanar" // Edited by DaNNe.

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", "EVENT_RoundStart", "a", "1=0", "2=0");
	//Edited by DaNNe.
	register_message(get_user_msgid("TextMsg"), "MSG_TextMessage")
	// End...
	
	mp_freezetime = get_cvar_pointer("mp_freezetime");
	set_pcvar_num(mp_freezetime, 5);
	SyncHudMessage = CreateHudSyncObj();
}

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


public EVENT_RoundStart() {
	SecondsUntillInvasion = 5;
	set_task( 0.1, "CountDown" );
}

// Edited By DaNNe.
public MSG_TextMessage() {
	static TextMsg[22];
	get_msg_arg_string(2, TextMsg, charsmax(TextMsg))
	if(equal(TextMsg, "#Terrorists_Win")) {
		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Furienii au distrus Universul !")
		ScreenFade(0, 0, 0)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#CTs_Win")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au salvat Universul !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Bomb_Defused")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa dezamorseze bomba !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Target_Bombed")) {
		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Bomba a explodat. Universul a fost distrus !")
		ScreenFade(0, 0, 0)
		return PLUGIN_HANDLED;
	}
	else if(equal(TextMsg, "#Target_Saved")) {
		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa salveze locurile in care putea fi plantata bomba !")
		ScreenFade(200, 200, 200)
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public ScreenFade(red, green, blue) {
	message_begin(MSG_BROADCAST, get_user_msgid("ScreenFade"));
	write_short((1<<12)*4);
	write_short((1<<12)*1);
	write_short(0x0001);
	write_byte(red);
	write_byte(green);
	write_byte(blue);
	write_byte(250);
	message_end();
}
// End...

public CountDown() {
	if(SecondsUntillInvasion > 0) {
		FurienEffect();
		AntiFurienEffect();
		
		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 FurienEffect() {
	new iPlayers[32];
	new iPlayersNum;
	
	get_players(iPlayers, iPlayersNum, "ae", "TERRORIST");
	
	for(new i = 0 ; i < iPlayersNum ; i++) {
		if(is_user_connected(iPlayers)) {	
			ShakeScreen(iPlayers, 0.7);
			FadeScreen(iPlayers , 0.5, 230, 0, 0, 160);
		}
	}
}
public AntiFurienEffect() {
	new iPlayers[32];
	new iPlayersNum;
	
	get_players(iPlayers, iPlayersNum, "ae", "CT");
	
	for(new i = 0 ; i < iPlayersNum ; i++) {
		if(is_user_connected(iPlayers)) {	
			ShakeScreen(iPlayers, 0.7);
			FadeScreen(iPlayers , 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();
}


Ceata alba apare doar cand castiga Anti-Furienii. Cand castiga Furienii apare neagra.
Sunetul era de la mine de pe server... Am uitat de el. :))
Ai aici o alta versiune...
P.S: FreezeTime trebuie setat manual din server.cfg, cel putin asa e la mine pe serverul de teste :-?? :))
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

08 Jun 2014, 23:00

1.La inceputul rundei,ecranul se face verde,as vrea rosu la t si albastru la ct. -rezolvat
2.Ceata alba de la final nu apare deloc. -nici ceata neagra nici alba
3.Nu as vrea sunetul ala cu "Pune bomba sau te ingrop"-rezolvat
P.S:nu trebuia sa scoti efectul ala de dark de pe parucursul rundei.
Multumesc ca ai incercat mai astept
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

10 Jun 2014, 09:21

Up time
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2811
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 244 times
Been thanked: 129 times
Contact:

10 Jun 2014, 12:56

| Afiseaza codul
#include <amxmodx>

    #define PLUGIN "Furien Invasion :-?"
    #define VERSION "1.0"
    #define AUTHOR "Askhanar" // Edited by DaNNe.

    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", "EVENT_RoundStart", "a", "1=0", "2=0");
    	//Edited by DaNNe.
    	register_message(get_user_msgid("TextMsg"), "MSG_TextMessage")
    	// End...
    	
    	mp_freezetime = get_cvar_pointer("mp_freezetime");
    	set_pcvar_num(mp_freezetime, 5);
    	SyncHudMessage = CreateHudSyncObj();
    }

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


    public EVENT_RoundStart() {
    	SecondsUntillInvasion = 5;
    	set_task( 0.1, "CountDown" );
	set_lights("b") // Setezi tu lumina
    }	

    // Edited By DaNNe.
    public MSG_TextMessage() {
    	static TextMsg[22];
    	get_msg_arg_string(2, TextMsg, charsmax(TextMsg))
    	if(equal(TextMsg, "#Terrorists_Win")) {
    		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Furienii au distrus Universul !")
    		ScreenFade(0, 0, 0)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#CTs_Win")) {
    		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au salvat Universul !")
    		ScreenFade(200, 200, 200)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#Bomb_Defused")) {
    		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa dezamorseze bomba !")
    		ScreenFade(200, 200, 200)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#Target_Bombed")) {
    		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Bomba a explodat. Universul a fost distrus !")
    		ScreenFade(0, 0, 0)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#Target_Saved")) {
    		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa salveze locurile in care putea fi plantata bomba !")
    		ScreenFade(200, 200, 200)
    		return PLUGIN_HANDLED;
    	}
    	return PLUGIN_CONTINUE;
    }

    public ScreenFade(red, green, blue) {
    	message_begin(MSG_BROADCAST, get_user_msgid("ScreenFade"));
    	write_short((1<<12)*4);
    	write_short((1<<12)*1);
    	write_short(0x0001);
    	write_byte(red);
    	write_byte(green);
    	write_byte(blue);
    	write_byte(250);
    	message_end();
    }
    // End...

    public CountDown() {
    	if(SecondsUntillInvasion > 0) {
    		FurienEffect();
    		AntiFurienEffect();
    		
    		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 FurienEffect() {
    	new iPlayers[32];
    	new iPlayersNum;
    	
    	get_players(iPlayers, iPlayersNum, "ae", "TERRORIST");
    	
    	for(new i = 0 ; i < iPlayersNum ; i++) {
    		if(is_user_connected(iPlayers)) {	
    			ShakeScreen(iPlayers, 0.7);
    			FadeScreen(iPlayers , 0.5, 230, 0, 0, 160);
    		}
    	}
    }
    public AntiFurienEffect() {
    	new iPlayers[32];
    	new iPlayersNum;
    	
    	get_players(iPlayers, iPlayersNum, "ae", "CT");
    	
    	for(new i = 0 ; i < iPlayersNum ; i++) {
    		if(is_user_connected(iPlayers)) {	
    			ShakeScreen(iPlayers, 0.7);
    			FadeScreen(iPlayers , 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();
    }

Pentru a seta lumina, te duci in publicul: EVENT_RoundStart() si cauti set_lights("b")... Daca vrei mai intuneric, pui a (Se face intuneric total) iar lumina mai mare pui c, d, e, etc...
P.S: La mine merge ceata. :-??
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

10 Jun 2014, 13:10

DaNNe. wrote:
| Afiseaza codul
#include <amxmodx>

    #define PLUGIN "Furien Invasion :-?"
    #define VERSION "1.0"
    #define AUTHOR "Askhanar" // Edited by DaNNe.

    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", "EVENT_RoundStart", "a", "1=0", "2=0");
    	//Edited by DaNNe.
    	register_message(get_user_msgid("TextMsg"), "MSG_TextMessage")
    	// End...
    	
    	mp_freezetime = get_cvar_pointer("mp_freezetime");
    	set_pcvar_num(mp_freezetime, 5);
    	SyncHudMessage = CreateHudSyncObj();
    }

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


    public EVENT_RoundStart() {
    	SecondsUntillInvasion = 5;
    	set_task( 0.1, "CountDown" );
	set_lights("b") // Setezi tu lumina
    }	

    // Edited By DaNNe.
    public MSG_TextMessage() {
    	static TextMsg[22];
    	get_msg_arg_string(2, TextMsg, charsmax(TextMsg))
    	if(equal(TextMsg, "#Terrorists_Win")) {
    		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Furienii au distrus Universul !")
    		ScreenFade(0, 0, 0)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#CTs_Win")) {
    		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au salvat Universul !")
    		ScreenFade(200, 200, 200)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#Bomb_Defused")) {
    		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa dezamorseze bomba !")
    		ScreenFade(200, 200, 200)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#Target_Bombed")) {
    		set_hudmessage(220, 30, 0, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Bomba a explodat. Universul a fost distrus !")
    		ScreenFade(0, 0, 0)
    		return PLUGIN_HANDLED;
    	}
    	else if(equal(TextMsg, "#Target_Saved")) {
    		set_hudmessage(0, 30, 220, -1.0, 0.15, 1, 5.1, 5.0)
    		ShowSyncHudMsg(0, SyncHudMessage, "Anti-Furienii au reusit sa salveze locurile in care putea fi plantata bomba !")
    		ScreenFade(200, 200, 200)
    		return PLUGIN_HANDLED;
    	}
    	return PLUGIN_CONTINUE;
    }

    public ScreenFade(red, green, blue) {
    	message_begin(MSG_BROADCAST, get_user_msgid("ScreenFade"));
    	write_short((1<<12)*4);
    	write_short((1<<12)*1);
    	write_short(0x0001);
    	write_byte(red);
    	write_byte(green);
    	write_byte(blue);
    	write_byte(250);
    	message_end();
    }
    // End...

    public CountDown() {
    	if(SecondsUntillInvasion > 0) {
    		FurienEffect();
    		AntiFurienEffect();
    		
    		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 FurienEffect() {
    	new iPlayers[32];
    	new iPlayersNum;
    	
    	get_players(iPlayers, iPlayersNum, "ae", "TERRORIST");
    	
    	for(new i = 0 ; i < iPlayersNum ; i++) {
    		if(is_user_connected(iPlayers)) {	
    			ShakeScreen(iPlayers, 0.7);
    			FadeScreen(iPlayers , 0.5, 230, 0, 0, 160);
    		}
    	}
    }
    public AntiFurienEffect() {
    	new iPlayers[32];
    	new iPlayersNum;
    	
    	get_players(iPlayers, iPlayersNum, "ae", "CT");
    	
    	for(new i = 0 ; i < iPlayersNum ; i++) {
    		if(is_user_connected(iPlayers)) {	
    			ShakeScreen(iPlayers, 0.7);
    			FadeScreen(iPlayers , 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();
    }

Pentru a seta lumina, te duci in publicul: EVENT_RoundStart() si cauti set_lights("b")... Daca vrei mai intuneric, pui a (Se face intuneric total) iar lumina mai mare pui c, d, e, etc...
P.S: La mine merge ceata. :-??

Compilat,testat,enervat:Totul e bun la inceput apare cum trebuie,aia cu lumina am pus "c" dar nu a avut efect rezolv ala data,la final ori nu ai inteles ori nu functioneaza.Dupa ultimul kill,la toti jucatorii sa li se faca ecranul alb ca la blind,nu deodata ci treptat.
P.S:In legatura cu ce ai spus tu o fac cand vin din oras.
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2811
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 244 times
Been thanked: 129 times
Contact:

10 Jun 2014, 21:19

In plugin nu se face "ceata" aia dupa ultimul kill, ci cand castiga una dintre echipe (Furienii = culoarea neagra, Anti-Furienii = culoarea alba).
Lumina functioneaza...
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3854
Joined: 24 Aug 2011, 12:24
Detinator Steam: Nu
CS Status:
Detinator server CS: ☯∴
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 595 times
Contact:

11 Jun 2014, 12:37

Recomand a 2 sursa :)))))
Last edited by levin on 13 Jun 2014, 22:29, edited 1 time in total.
Nu îmi mai trimiteți PM pe forum! Nu merge să răspund
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

11 Jun 2014, 23:00

Up time
User avatar
|NGU|Anonymus
Membru, skill +1
Membru, skill +1
Posts: 293
Joined: 26 May 2014, 15:26
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: In progres...
Has thanked: 16 times
Been thanked: 64 times

13 Jun 2014, 22:05

Up time.
Post Reply

Return to “Cereri”

  • Information