Raised This Month: $ Target: $400
 0% 

Optimize


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 01-19-2012 , 06:35   Optimize
Reply With Quote #1

Code:
set_task( 1.0 , "hud" , .flags="b" ) hud( ) {     // ...     show_hudmessage( ... ) }


OR


Code:
new iEnt = create_entity( "info_target" ) set_pev( iEnt , pev_classname , "hud" ) register_think( "hud" , "show_points" ) set_pev( iEnt , pev_nextthink , get_gametime( ) + 5.0 ) public hud( iEnt ) {     set_pev( iEnt , pev_nextthink , get_gametime( ) + 1.0 )     // ...     show_hudmessage( ... ) }

What is the best ?
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-19-2012 , 08:28   Re: Optimize
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=43049
__________________
Arkshine is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 01-19-2012 , 09:58   Re: Optimize
Reply With Quote #3

Thank you.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 03-25-2012 , 11:36   Re: Optimize
Reply With Quote #4

so which one was better? the think with get_gametime?
vamppa is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 03-25-2012 , 12:58   Re: Optimize
Reply With Quote #5

Yes.
__________________
You can do anything you set your mind to, man.

Devil259 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:08.


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