Not tested
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <reapi>
#include <hamsandwich>
#include <csx>
#define VERSION "0.0.1"
#define PLUGIN ""
new bool:g_bCanPlantC4
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ConnorMcLeod & iceeedR")
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_c4", "CC4_PrimaryAttack")
register_event("HLTV","EventNewRnd", "a", "1=0", "2=0")
}
public EventNewRnd()
{
g_bCanPlantC4 = true
}
public bomb_planted(planter)
{
g_bCanPlantC4 = false
}
public CC4_PrimaryAttack( iC4 )
{
if( !g_bCanPlantC4 )
{
new id = get_member(id, m_pPlayer)
client_print(id, print_chat, "C4 is actually disabled !!")
set_member(iC4, m_flNextAttack, 1.0)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
__________________