PHP- Kodu:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <basebuilder>
#include <engine>
#include <fakemeta>
#define PLUGIN "Inf. After Build Phase"
#define VERSION "1.0"
#define AUTHOR "Mlhcnshn"
#define Server "CILGIN TURKLER" // Server isminizi buradan düzenleyebilirsiniz.
#define Mesaj "Isimli Admin ^4Build Time^3'dan Sonra Tas Oynatti ^4[SS]^3 Cekip Bildirin." // Gösterilecek Mesajı Buradan düzenleyebilirsiniz, ColorChat Renk Kodlarına Dikkat Edin.
#define MAXPLAYERS 32
#define BUILD_DELAY 0.75
new g_iEntBarrier
new g_isBuildPhase
new Float:g_fBuildDelay[MAXPLAYERS+1]
new bool:Kontrol;
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("+grap","Check")
register_forward(FM_CmdStart, "fw_CmdStart");
g_iEntBarrier = find_ent_by_tname( -1, "barrier" );
g_isBuildPhase = get_cvar_num("bb_buildtime");
register_logevent( "NewRoundStart", 2, "1=Round_Start" );
}
public NewRoundStart()
{
Kontrol = false;
set_task(float(g_isBuildPhase),"Check2")
}
public Check2()
{
Kontrol = true;
}
public Check(id)
{
if (g_fBuildDelay[id] + BUILD_DELAY > get_gametime())
{
g_fBuildDelay[id] = get_gametime()
}
else
{
g_fBuildDelay[id] = get_gametime()
if(Kontrol && get_user_flags(id) & ADMIN_KICK && get_user_team(id)==2)
{
new ent, bodypart, name[33];
get_user_aiming (id,ent,bodypart)
get_user_name(id,name,32)
new szClassname[16], szTarget[16]
pev(ent, pev_classname, szClassname, sizeof(szClassname)-1)
pev(ent, pev_targetname, szTarget, sizeof(szTarget)-1)
if (ent != g_iEntBarrier && equal(szClassname, "func_wall") && !equal(szTarget, "ignore"))
{
ColorChat(0,"^4[%s] ^1%s ^3%s",Server,name,Mesaj)
}
}
}
return PLUGIN_HANDLED
}
public fw_CmdStart( id, uc_handle, randseed )
{
if (!is_user_connected(id) || !is_user_alive(id))
return FMRES_IGNORED
new button = get_uc( uc_handle , UC_Buttons );
new oldbutton = pev(id, pev_oldbuttons)
if( button & IN_USE && !(oldbutton & IN_USE))
Check(id)
return FMRES_IGNORED;
}
stock ColorChat(const id, const string[], {Float, Sql, Resul,_}:...) {
new msg[191], players[32], count = 1;
static len;
len = formatex(msg, charsmax(msg), "^x01" );
vformat(msg[len], charsmax(msg) - len, string, 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();
}
}
return;
}