Raised This Month: $51 Target: $400
 12% 

Solved [DOUBT] Solution for less stress


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-19-2020 , 20:41   [DOUBT] Solution for less stress
Reply With Quote #1

Hey guys, a little doubt, thinking about the lowest possible stress on the machine, what is the most advantageous?

PHP Code:
set_task_ex(0.1"Test", .flags SetTask_Once 
or

PHP Code:
RequestFrame("Test"
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 09-20-2020 at 13:06.
iceeedr is offline
Send a message via Skype™ to iceeedr
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-19-2020 , 23:32   Re: [DOUBT] Solution for less stress
Reply With Quote #2

Explain what you're trying to do, not which code is better.
__________________
Bugsy is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-20-2020 , 10:15   Re: [DOUBT] Solution for less stress
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Explain what you're trying to do, not which code is better.
Hi Bugsy, nothing special, but my plugin has some tasks that are called only once and I use 0.1 in the float time, so I thought I could use RequestFrame instead of a task, but I was just wondering if it would be a good one method.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-20-2020 , 11:26   Re: [DOUBT] Solution for less stress
Reply With Quote #4

If it's literally only one time per map then I'd leave it as a set_task().
__________________
Bugsy is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-20-2020 , 11:54   Re: [DOUBT] Solution for less stress
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
If it's literally only one time per map then I'd leave it as a set_task().
If it were called over and over again, would you change it, or would it not change your final judgment? Just out of curiosity.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-20-2020 , 12:59   Re: [DOUBT] Solution for less stress
Reply With Quote #6

If you could call it with an interval, set_task() would be fine. IIRC, it's expensive to create new tasks. Another option is to use a thinking entity.
__________________
Bugsy is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 09-20-2020 , 13:05   Re: [DOUBT] Solution for less stress
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
If you could call it with an interval, set_task() would be fine. IIRC, it's expensive to create new tasks. Another option is to use a thinking entity.
Nice, thanks!
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
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 18:15.


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