Kod: Tümünü seç
/* www.amxmodxtr.com */
#include <amxmodx>
#include <fun>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <nvault>
#include <engine>
#define PLUGIN "MapAcildigindaKopKop"
#define VERSION "1.0"
#define AUTHOR "PaZee"
new const pazeses[] = "sesyolu.wav"
new bool:sarsiliyor = false
new sadecebirkere
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("vurefekti",2,"1=Round_Start")
sadecebirkere = register_cvar ("sadecebirkere","1")
}
public vurefekti(id)
{
if(get_pcvar_num(sadecebirkere))
{
emit_sound(0, CHAN_AUTO, pazeses, VOL_NORM, ATTN_NORM , 0, PITCH_NORM)
set_task(0.2,"Sarsinti",4701,"",0,"b")
OnGlow(id)
set_task(30.0,"DepremiBitir",4702)
set_task(30.0,"OffGlow",3162)
sarsiliyor = true
}
}
public plugin_precache()
{
precache_sound(pazeses)
}
public Sarsinti(TaskID)
{
for(new id = 1; id < 33; id++)
{
if(is_user_connected(id) && is_user_alive(id) && sarsiliyor)
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenShake"), {0,0,0}, id)
write_short(0xFFFF)
write_short(1<<13)
write_short(0xFFFF)
message_end()
}
}
}
public DepremiBitir(TaskID)
{
remove_task(4701)
sarsiliyor = false
remove_task(TaskID)
server_cmd("amx_cvar sadecebirkere 0")
}
public OnGlow( id ) {
new players[ 32 ], xnum;
get_players( players, xnum, "ah" );
for( new x = 0; x < xnum; x++ ) {
new x1 = random_num( 0, 255 );
new x2 = random_num( 0, 255 );
new x3 = random_num( 0, 255 );
new xAlpha = random_num( 40, 65 );
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0, 0, 0 }, players[ x ] );
write_short( ~0 );
write_short( ~0 );
write_short( 1<<12 );
write_byte( x1 );
write_byte( x2 );
write_byte( x3 );
write_byte( xAlpha );
message_end( );
set_user_rendering( players[ x ], kRenderFxGlowShell, x1, x2, x3, kRenderTransAlpha, 255 );
}
}
public OffGlow( TaskID ) {
new players[ 32 ], xnum;
get_players( players, xnum, "h" );
for( new x = 0; x < xnum; x++ ) {
message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), { 0, 0, 0 }, players[ x ] );
write_short( ~0 );
write_short( ~0 );
write_short( 1<<12 );
write_byte( 0 );
write_byte( 0 );
write_byte( 0 );
write_byte( 0 );
message_end( );
set_user_rendering( players[ x ] );
}
}
stock chat_color(const id, const input[], any:...) {
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
replace_all(msg, 190, "!team2", "^0")
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();
}
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/