Raised This Month: $ Target: $400
 0% 

FM_Think


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
@.SizNeR
Member
Join Date: Jun 2013
Old 08-21-2013 , 14:40   FM_Think
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < fakemeta >

new const g_szEntityClass[] = "MyEntity";

new 
g_iEntity;


public 
plugin_init()
{
    
register_plugin"Using FM_Think""v1.0""@.SizNeR" );
    
    
register_forwardFM_Think"FwThink" );
    
    
    
CmdCreateEntity();
}

public 
FwThinkiEntity )
{
    if ( !
pev_validiEntity ) )
        return 
1;
        
    static 
szEntityClass32 ];
    
    
peviEntitypev_classnameszEntityClasscharsmaxszEntityClass ) );
    
    if ( !
equaliszEntityClassg_szEntityClass ) )
    {
        
CmdSetThinkg_iEntity1.0 );
        
        return 
1;
    }
    
    new 
iPlayers32 ], iCtCountiTerrorCount;
    
    
get_playersiPlayersiCtCount"ceh""CT" );
    
    
get_playersiPlayersiTerrorCount"ceh""TERRORIST" );
    
    if ( ( 
iCtCount <= && iTerrorCount >= ) || ( iCtCount <= && iTerrorCount >= 10 ) || ( iCtCount <= && iTerrorCount >= 15 ) || ( iCtCount <= && iTerrorCount >= 20 ) )
    {
        
MyPublic();
        
        return 
1;
    }
    
    
CmdSetThinkg_iEntity1.0 );
    
    return 
1;
}

public 
MyPublic()
{
    
log_amx"On My Public." );
}

stock CmdCreateEntity()
{
    
g_iEntity engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString"info_target" ) );
    
    
set_pevg_iEntitypev_classnameg_szEntityClass );
    
    
CmdSetThinkg_iEntity1.0 );
}

stock CmdSetThinkiEntityFloat:flTime )
{
    
set_peviEntitypev_nextthinkget_gametime() + flTime );

Help please?

Last edited by @.SizNeR; 08-21-2013 at 14:41.
@.SizNeR is offline
 



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 15:54.


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