Quote:
Originally Posted by HamletEagle
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 = engfunc( EngFunc_FindEntityByString, iEnt, "classname", "grenade" ) ) )
{
// Check if the grenade is C4 (Bomb)
if ( pev_valid( iEnt ) && get_pdata_bool( iEnt, m_bIsC4 ) )
cs_set_c4_explode_time( iEnt, 300.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?
__________________