Post by -|P|-LaY-|B|-o-|Y|- on Jun 24, 2016 22:33:44 GMT
Hello Guys I Create New Extra Base Builder Like [GP] But Sh'e Don't Working
And Eny Pro Coder Fix It To Me
Code Of Plugin :
And Eny Pro Coder Fix It To Me
Code Of Plugin :
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <basebuilder>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
#define TASK_BARTIME 5000
new const EXPLO_SPRITE[] = "sprites/fireexp.spr"
new const EXPLO_SOUND[] = "bigexplosion2_jairo.wav"
new g_msgBarTime, cvar_explotime, cvar_respawn, cvar_respawntime, g_ExpSpr;
new g_extra[33]
public plugin_init()
{
register_plugin("Extra AllaHu Akbar", "1.0", "PlayBoy")
register_clcmd("jihad", "buy_jihad")
register_forward(FM_CmdStart, "CmdStart" )
cvar_respawn = register_cvar("bb_suicide_respawn", "0")
cvar_respawntime = register_cvar("bb_suicide_respawn_time", "60.0")
cvar_explotime = register_cvar("bb_suicide_explotime", "4")
g_msgBarTime = get_user_msgid("BarTime")
}
public plugin_precache(){
precache_sound(EXPLO_SOUND)
g_ExpSpr = precache_model(EXPLO_SPRITE)
}
public buy_jihad(id)
{
if(!g_extra[id])
{
g_extra[id] = 1
client_print(id, print_chat, "*** Mar7ba bik fl jihad ***")
}
}
public remove_bartime(id)
{
message_begin(MSG_ONE, g_msgBarTime, _, id)
write_byte(0)
write_byte(0)
message_end()
remove_task(id+TASK_BARTIME)
emit_sound(id, CHAN_VOICE, EXPLO_SOUND, 0.0, ATTN_NORM, 0, PITCH_NORM)
}
public CmdStart(id)
{
if(g_extra[id] == 1)
{
static button, oldbutton
button = pev(id, pev_button)
oldbutton = pev(id, pev_oldbuttons)
if(button & IN_USE && !(oldbutton & IN_USE))
{
message_begin(MSG_ONE, g_msgBarTime, _, id)
write_byte(get_pcvar_num(cvar_explotime))
write_byte(0)
message_end()
emit_sound(id, CHAN_VOICE, EXPLO_SOUND, 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(get_pcvar_float(cvar_explotime), "Explo", id+TASK_BARTIME)
}
if(oldbutton & IN_USE && !(button & IN_USE))
set_task(0.1, "remove_bartime", id)
}
}
public client_disconnect(id)
{
g_extra[id] = 0
set_task(0.1, "remove_bartime", id)
}
public Explo(id)
{
id -= TASK_BARTIME
new Float:origin[3]
pev(id, pev_origin, origin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_EXPLOSION)
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
write_short(g_ExpSpr)
write_byte(10)
write_byte(15)
write_byte(0)
message_end()
user_silentkill(id)
g_extra[id] = 0
if(get_pcvar_num(cvar_respawn) == 1)
set_task(get_pcvar_float(cvar_respawntime), "respawn", id)
}
public respawn(id)
{
if(!is_user_alive(id))
{
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
}
stock log_kill(killer, victim, weapon[],headshot)
{
user_silentkill( victim );
message_begin( MSG_ALL, get_user_msgid( "DeathMsg" ), {0,0,0}, 0 );
write_byte( killer );
write_byte( victim );
write_byte( headshot );
write_string( weapon );
message_end();
new kfrags = get_user_frags( killer );
set_user_frags( killer, kfrags + 1 );
new vfrags = get_user_frags( victim );
set_user_frags( victim, vfrags - 1 );
}