Pass params w/ set_task...
I've got a function called
ohh_that_tickles(vIndex) and I want to do a set task on that function, but I need to set the index of the player its going to be called on. I keep trying to pass the params in the set_task function, but cannot get it to work... Code:
|
params to set tack have to be passed as an array.
Code:
ohh_that_tickles(vIndex[1])Code:
new vIndexa[1] |
Re: Pass params w/ set_task...
jtp10181 is right but try:
Code:
|
also if you have many tasks and want to remove one I suggest using something like this for a few
Code:
|
Quote:
Code:
|
Thanks guys. Real help.
Any idea what params are passed on DeathMSG? I know how to do read_data, but could someone point me in a direction? |
1 = killer
2 =victim 3=headshot 4=weapon |
Nice, thanks a lot.
Not too long until its done and ready for a beta release ;) and its SO simple! (Sorry for all the Q's...I'm rusty...since AMXX came about, I got divided on coding so I decided to wait until things had settled down again and here we are) |
Can you pass multiple params?...and how?
|
set_task(float(time), stringfunctionname[], stringarguments[], intnumofarguments)
the difficult part is passing multiple arrays. Lets say you pass two size 40 arrays, then stringarguments should be those two concatinated together with the first starting at stringarguments[0] and the 2nd starting at stringarguments[20]. intnumofarguments would then be 40. |
| All times are GMT -4. The time now is 14:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.