Raised This Month: $ Target: $400
 0% 

Think Function Isn't Working


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 06-10-2010 , 21:43   Think Function Isn't Working
Reply With Quote #1

Hey, I'm wondering what's wrong with this code.

PHP Code:
public thinkDynamite(ent)
{
    static 
id;
    
id entity_get_edict(entEV_ENT_owner);
    
    if( 
g_iPlayerClass[id] != DEMOLITIONS )
    {
        
remove_entity(ent);
        return;
    }
    
    if( !
g_fDynamiteCountdown[id] )
    {
        
ClearSyncHud(idg_msgSyncHudObject_3);
        
        
explode_dynamite(ident);
        return;
    }
    
    
set_hudmessage(255000.350.015.02.00.50.5);
    
ShowSyncHudMsg(idg_msgSyncHudObject_3"%.1f"g_fDynamiteCountdown[id]);
    
    
g_fDynamiteCountdown[id] -= 0.1;
    
entity_set_float(entEV_FL_nextthinkhalflife_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.
shadow.hk is offline
Send a message via MSN to shadow.hk
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode