Raised This Month: $ Target: $400
 0% 

how to pass someone's id to another function?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-17-2006 , 15:02   Re: how to pass someone's id to another function?
Reply With Quote #10

If you want, you can pass the player id as the task id. If no extra parameters are set, then the task id will be passed to the function. Example:

Code:
public function1(id) {      set_task(5.0,"function2",id); } public function2(id) {      // id in function2 is the same as in function1 }

But if you plan to have multiple tasks and also use the other task functions (change_task, task_exists, remove_task), then you should use unique task ids and instead pass the player id the way that wonsae showed you.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 04:48.


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