sending data through set_task not working
This plugin that I have written works well if I don't use tasks and just execute my command immediately (engclient_cmd), but doesn't work right with a set task delay. It looks like the data isn't being passed correctly.
Code: PHP Code:
Code:
|
Re: sending data through set_task not working
You are telling set_task the size of idstring is 0 and it should be 3.
set_task( 3.0 , "say_sorry" ,killer , idstring , 3 ) And public say_sorry(idstr[3]) |
Re: sending data through set_task not working
That worked, Thanks, +karma.
I started thinking more about it and realized that I should pass the number through as direct as possible for effeciency(i.e. not using an intermediary string and conversion functions). So I put "killer" into a single cell array and passed the array: Code:
new param[1]Code:
say_sorry(param[]) |
Re: sending data through set_task not working
If you want to pass the id, just do :
set_task( 3.0, "say_sorry", killer ); public say_sorry ( id ) { } |
Re: sending data through set_task not working
Will that assign a task id as well as pass the actual id so that my remove task will work?
|
Re: sending data through set_task not working
player's id is just a number, you can pass what you want as task id.
|
Re: sending data through set_task not working
Quote:
Quote:
I need to prevent: kill, sorry, kill, sorry, kill sorry. I need: kill, kill, kill, sorry. |
| All times are GMT -4. The time now is 17:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.