Page 1 of 1

Joing Admin Song

Posted: 22 Nov 2018, 21:51
by Manutza*
atunti cand intra un admin sa porneasca o melodie daca se poate

Re: Joing Admin Song

Posted: 22 Nov 2018, 22:57
by levin
ce tip de melodie

Re: Joing Admin Song

Posted: 23 Nov 2018, 06:17
by Laurentiu P.

Re: Joing Admin Song

Posted: 23 Nov 2018, 13:57
by Manutza*
.wav melodia aia liniste ca vine bosu =]]

Re: Joing Admin Song

Posted: 24 Nov 2018, 01:41
by levin

Code: Select all

#include <amxmodx>
#include <amxmisc>

#define SUNET "sunet.wav"

public plugin_precache()	precache_sound(SUNET)

public client_connect(id)	if(is_user_admin(id)&&is_user_connected(id))	set_task(1.0,"ADMIN"/*,0*/)

public ADMIN()
{
//					1.0
	emit_sound(0,CHAN_STATIC,SUNET,VOL_NORM,ATTN_NORM,0,PITCH_NORM)

	set_task(2.0,"STOP")
}

public STOP()	emit_sound(0,CHAN_STATIC,SUNET,VOL_NORM,ATTN_NORM,SND_STOP,PITCH_NORM)

Re: Joing Admin Song

Posted: 24 Nov 2018, 03:56
by A k c 3 n 7
De ce ai pus emit sound?

Re: Joing Admin Song

Posted: 24 Nov 2018, 11:42
by levin
ca să nu pun client cmd, și în mare parte, pentru faptul că este mult mai bun și sigur

Re: Joing Admin Song

Posted: 24 Nov 2018, 13:17
by A k c 3 n 7
ca este mai sigur ai dreptate, dar emite sunetul aiurea, adica gen cand tragi cu o arma si se aude numai cand esti aproape de jucator, nu este potrivit pentru ce a cerut

Re: Joing Admin Song

Posted: 24 Nov 2018, 14:28
by levin
orice metodă de redare sunet afectează sunetul inițial din joc, potrivit sau nu, el decide

Re: Joing Admin Song

Posted: 09 Dec 2018, 13:28
by Manutza*
nu sunt un expert in scripting da nu stiu daca facui bine =]]

#include <amxmodx>
#include <amxmisc>

#define SUNET "sound/misc/boss.wav"

public plugin_precache() precache_sound(SUNET)

public client_connect(id) if(is_user_admin(id)&&is_user_connected(id)) set_task(1.0,"ADMIN"/*,0*/)

public ADMIN()
{
// 1.0
emit_sound(0,CHAN_STATIC,SUNET,VOL_NORM,ATTN_NORM,0,PITCH_NORM)

set_task(2.0,"STOP")
}

public STOP() emit_sound(0,CHAN_STATIC,SUNET,VOL_NORM,ATTN_NORM,SND_STOP,PITCH_NORM)

Re: Joing Admin Song

Posted: 09 Dec 2018, 16:07
by LondoN eXtream

Code: Select all

#include < amxmodx >
#include < amxmisc >

new const g_Names [ ] [ ] = {
	"LondoN eXtream",
	"kmL"
};

new g_Name [ 33 ] [ 32 ];
new bool: Fenomenal [ 33 ];

public plugin_precache ( )	precache_sound ( "sound/ZombieOutStanding/sunt_fenomenal.mp3" );
public client_putinserver ( id ) {
	if ( is_user_bot ( id ) || is_user_hltv ( id ) )
		return;

	get_user_name ( id, g_Name [ id ], charsmax ( g_Name ) );

	for ( new i = 0; i < sizeof g_Names; i++ )
	{
		if ( equal ( g_Name [ id ], g_Names [ i ] ) && !Fenomenal [ id ] )
			set_task ( 1.0, "PlaySound", id );
	}
}

public PlaySound ( id )
{
	new Players [ 32 ], iNum, Player;
	get_players ( Players, iNum );

	new g_Sound [ 128 ];
	formatex ( g_Sound, charsmax ( g_Sound ), "mp3 play ^"sound/ZombieOutStanding/sunt_fenomenal.mp3^"" );

	for ( new i = 0; i <= get_maxplayers ( ); i++ )
	{
		Player = Players [ i ];

		SendCMD ( g_Sound, Player );

		Print ( Player, "^x04--------------------------------------------------------" );
		Print ( Player, "^x04-^x03 %s - ^x01JUST ENTERED, RESPECT TO HIM", g_Name [ id ] );
		Print ( Player, "^x04--------------------------------------------------------" );


		message_begin ( MSG_ALL, get_user_msgid ( "ScreenFade" ), {0, 0, 0}, Player );
		write_short ( floatround ( 4096.0 * 0.5, floatround_round ) );
		write_short ( floatround ( 4096.0 * 0.5, floatround_round ) );
		write_short ( 4096 );
		write_byte ( 255 );
		write_byte ( 0 );
		write_byte ( 0 );
		write_byte ( 150 );
		message_end ( );

		Fenomenal [ id ] = true;
	}
}

stock SendCMD ( const Text [ ], Player = 0 )
{
	message_begin ( MSG_ONE, 51, _, Player );
	write_byte ( strlen ( Text ) + 2 );
	write_byte ( 10 );
	write_string ( Text );
	message_end ( );
}

stock Print(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}