View Single Post
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 01-17-2021 , 02:57   Re: Only 1 C4 [Strip if Multiple C4's]
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
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(PLUGINVERSION"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_PrimaryAttackiC4 )
{
        if( !
g_bCanPlantC4 )
        {
                new 
id get_member(idm_pPlayer)
                
client_print(idprint_chat"C4 is actually disabled !!")
                
set_member(iC4m_flNextAttack1.0)
                return 
HAM_SUPERCEDE
        
}
        return 
HAM_IGNORED

Thank You !! Can you please specify which idea you implemented? It will help me to check much more easily, seems like 3rd? but still I can't see through coding eyes.
Alber9091 is offline