Hey, I'm wondering what's wrong with this code.
PHP Code:
public thinkDynamite(ent)
{
static id;
id = entity_get_edict(ent, EV_ENT_owner);
if( g_iPlayerClass[id] != DEMOLITIONS )
{
remove_entity(ent);
return;
}
if( !g_fDynamiteCountdown[id] )
{
ClearSyncHud(id, g_msgSyncHudObject_3);
explode_dynamite(id, ent);
return;
}
set_hudmessage(255, 0, 0, 0.35, 0.0, 1, 5.0, 2.0, 0.5, 0.5);
ShowSyncHudMsg(id, g_msgSyncHudObject_3, "%.1f", g_fDynamiteCountdown[id]);
g_fDynamiteCountdown[id] -= 0.1;
entity_set_float(ent, EV_FL_nextthink, halflife_time() + 0.1);
}
When I skip the think function the dynamite explodes fine... so the problem is in here somewhere and I'm not exactly sure what it is. Any help would be greatly appreciated.