Raised This Month: $ Target: $400
 0% 

set_task(0.01, "func", id) question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 12-05-2011 , 13:18   Re: set_task(0.01, "func", id) question
Reply With Quote #9

I tested it with message Te_Dlight

when the task time is 0.1
then light does not blink

light life byte was 2


and when i changed it 0.01 , just to testing
then
the light blink

light life byte was also 2

then i edit the light life to 1
tested it
also light blink


Then i changed a task time 0.05
and light life byte was 1

then light does not blink and it was lot more faster then task 0.1 time.
Mayby that code fail.


Also i tested it what compile write in amxx whit hex reading.
and result the task time what was 0.01 and i compiled
in .amxx the task time was also 0.01.

Sorry my bad english, I hope that you understand me.



Edit:

Tested now that on this plugin

PHP Code:
 
#include <amxmodx>
#include <amxmisc>
new g_test[2]
new 
g_testcount[2]
public 
plugin_init()
{
 
register_plugin"9""9""9" )
 
register_clcmd("say /testit""cmd_test")
}
public 
cmd_test(id)
{
 
g_test[1] = 2
 g_testcount
[1] = 0
 set_task
0.01"testit")
 
set_task0.1 "test_over")
}
public 
testit()
{
 if(
g_test[1] == 2)
 {
  
g_testcount[1]++
  
set_task0.01"testit")
 }
}
public 
test_over()
{
 static 
result
 result 
g_testcount[1]
 
g_test[1] = 1
 client_print
(0print_chat,"[TEST] %d"result);

and



0.01 time working fine.
But one time frame is missing only, it must be 10 i think.
So its a slower a little bit.

Edit

I Download amxmodx from http://www.amxmodx.org/downloads.php
And first i looked the dll size and my amxmodx what i use in cs are smaller than http://www.amxmodx.org/downloads.php

Then i test task 0.01 on new amxmodx on this plugin and result was 1
But if i use that task 0.01 it did not change it 0.1, its like little bit smaller value idk
The lighting is faster 0.01 than 0.1 task time.

Mayby the problem is that the script where i use 0.01 task time is very big.



question 2,

Why the amxmodx autors limit the task time?
Is it bad to use it smaller value than 0.1?
Attached Thumbnails
Click image for larger version

Name:	de_dust20000.jpg
Views:	982
Size:	21.1 KB
ID:	96284  

Last edited by .Dare Devil.; 12-05-2011 at 14:32.
.Dare Devil. 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 12:04.


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