Raised This Month: $ Target: $400
 0% 

Proper use of remove_task function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-16-2015 , 07:09   Proper use of remove_task function
Reply With Quote #1

PHP Code:
public Event_DeathMsg( )
{
        new 
iVictim read_data);
    
        static 
Float:flOriginiCoords ];
        
peviVictimpev_originflOrigin );
    
        new 
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString"info_target" ) );
    
    
/* --| Modify the origin a little bit. This is calculated to be set on floor */
        
flOrigin] -= 36
    
        
engfuncEngFunc_SetOriginiEntflOrigin );
    
        if( !
pev_validiEnt ) )
        {
        return 
PLUGIN_HANDLED;
        }
    
        
set_peviEntpev_classnamegMedKitClassname );
        
engfuncEngFunc_SetModeliEntszModelKit );
        
dllfuncDLLFunc_SpawniEnt );
        
set_peviEntpev_solidSOLID_BBOX );
        
set_peviEntpev_movetypeMOVETYPE_TOSS );
        
engfuncEngFunc_SetSizeiEntFloat:{ -23.160000, -13.660000, -0.050000 }, Float:{ 11.47000012.7800006.720000 } );
        
engfuncEngFunc_DropToFlooriEnt );
    
    
set_renderingiEntkRenderFxGlowShell255255255kRenderFxNone27 )
        
        
set_task(12.0"delete_entity"iVictim)
    
        return 
PLUGIN_HANDLED;
}

public 
delete_entity(iVictim)
{
        new 
iEntity FM_NULLENT

    
while( ( iEntity find_ent_by_classiEntitygMedKitClassname ) ) )
    {
        
engfuncEngFunc_RemoveEntityiEntity )
    }    

Where is proper to add remove_task(iVictim),in public delete_entity(iVictim) or public Event_DeathMsg( ) ?
Krtola is offline
Send a message via Skype™ to Krtola
 


Thread Tools
Display Modes

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 18:01.


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