View Single Post
Nax0ne
Senior Member
Join Date: Jul 2011
Location: Chile
Old 01-14-2018 , 15:29   Re: How to use "cs_set_c4_explode_time" ??
Reply With Quote #9

Quote:
Originally Posted by HamletEagle View Post
Your solution is bad. Find all grenade entities and check m_bIsC4 offset. You can find the code in my Objective Reset plugin.
PHP Code:
const m_bIsC4 385;

public 
plugin_init()
{
    
register_logevent("logevent_planted_bomb"3"2=Planted_The_Bomb")
}

public 
logevent_planted_bomb() 
{
    new 
iEnt = -1;    

    
// Loop through all grenades
    
while ( ( iEnt engfuncEngFunc_FindEntityByStringiEnt"classname""grenade" ) ) )
    {
        
// Check if the grenade is C4 (Bomb)
        
if ( pev_validiEnt ) && get_pdata_booliEntm_bIsC4 ) )
            
cs_set_c4_explode_timeiEnt300.0 );  //Change the explode time
    
}

Something like that? I extracted your code.

And i tested, but the bomb doesn't change its time. Is there a problem?
__________________

Last edited by Nax0ne; 01-14-2018 at 15:36.
Nax0ne is offline