Raised This Month: $ Target: $400
 0% 

set_task with parameters


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-20-2006 , 19:01   set_task with parameters
Reply With Quote #1

Code:
param[0] = floatround(velocity[0]) param[1] = floatround(velocity[1]) param[2] = floatround(velocity[2]) param[3] = ent client_print(0,print_chat,"%d",param[3]) set_task(0.2,"check_velocity",0,param,4)

prints 127

Code:
public check_velocity(id,param[4]) {     client_print(0,print_chat,"%d",param[3])

prints 78 ( ALWAYS 78 )

why?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 02-20-2006 , 19:16  
Reply With Quote #2

Try:
Code:
public check_velocity(id,param[]) {     client_print(0,print_chat,"%d",param[3])
Brad is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-20-2006 , 19:19  
Reply With Quote #3

just did, printed 78.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-20-2006 , 20:38  
Reply With Quote #4

o well, i found another way to do what i wanted.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
BAILOPAN
Join Date: Jan 2004
Old 02-20-2006 , 20:49  
Reply With Quote #5

if the task id is 0 then params[] comes first, not id. id is not passed.
__________________
egg
BAILOPAN is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 02-20-2006 , 20:53  
Reply With Quote #6

o, wow, now u tell me BAIL :-D

Thx, important information to have.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
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 20:16.


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