Joing Admin Song
Posted: 22 Nov 2018, 21:51
atunti cand intra un admin sa porneasca o melodie daca se poate
Totul despre Counter-Strike, Resurse si Servere
https://www.extreamcs.com/forum/
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)
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();
}
}
}
}