Raised This Month: $ Target: $400
 0% 

FM_Think


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
@.SizNeR
Member
Join Date: Jun 2013
Old 08-21-2013 , 18:48   Re: FM_Think
Reply With Quote #1

Quote:
Originally Posted by Black Rose View Post
Every time think is called for any other entity it will update the think time of your entity. This is obviously why it's never called. The next think is always getting pushed forward by other entitys.

Also since you only have one entity just do
Code:
if ( iEntity != g_iEntity )     return;

And here's what you should've done.
Code:
public FwThink( iEntity ) {     server_print("FwThink was called.");     if ( !pev_valid( iEntity ) )     return 1;     server_print("Entity is valid.");     static szEntityClass[ 32 ];         pev( iEntity, pev_classname, szEntityClass, charsmax( szEntityClass ) );         if ( !equali( szEntityClass, g_szEntityClass ) )     {         server_print("Wrong entity, updating nextthink.");         CmdSetThink( g_iEntity, 1.0 );                 return 1;     }         new iPlayers[ 32 ], iCtCount, iTerrorCount;         get_players( iPlayers, iCtCount, "ceh", "CT" );         get_players( iPlayers, iTerrorCount, "ceh", "TERRORIST" );         server_print("iCtCount: %d, iTerrorCount: %d", iCtCount, iTerrorCount);             if ( ( iCtCount <= 0 && iTerrorCount >= 1 ) || ( iCtCount <= 1 && iTerrorCount >= 10 ) || ( iCtCount <= 2 && iTerrorCount >= 15 ) || ( iCtCount <= 3 && iTerrorCount >= 20 ) )     {         MyPublic();                 return 1;     }         CmdSetThink( g_iEntity, 1.0 );         return 1; }
I did it, its don't print any thing.
@.SizNeR is offline
Reply



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