This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

set_task question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-18-2011 , 20:57   set_task question
Reply With Quote #1

Hey guys I have problems with getting parameters to a set_task, and I was thinking Im using it right but now I see I dont get the correct values:

I have a function

PHP Code:
strike_game(iParams[], id
And if I want to set a task to it with my params I do(for example):

PHP Code:
public client_connect(id)
{
        new 
Params[4]
        
Params[0] = 0
        Params
[1] = 1
        Params
[2] = 5
        Params
[3] = 10

        set_task
(10.0"strike_game"idParams)

Now, how do I know that the values are incorrect?

Cuz in strike_game function I have an 'if' that checks is_user_connected || !is_user_alive of that id sent, and it always gets blocked there, and I dont understand why (I realized it with placing client_print's).

Why do I use it wrongly?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-18-2011 at 20:58.
Diegorkable is offline
padilha007
Senior Member
Join Date: Jul 2008
Old 11-18-2011 , 21:05   Re: set_task question
Reply With Quote #2

This may help you:

PHP Code:
http://forums.alliedmods.net/showpost.php?p=1463372&postcount=2 
For more information:

PHP Code:
http://forums.alliedmods.net/search.php?searchid=8225322 
__________________

padilha007 is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-18-2011 , 21:08   Re: set_task question
Reply With Quote #3

nvm lol oh me so stupid, sorry for the useless thread.
Forgot to state the amount of params in the function "set_task"
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-18-2011 , 23:16   Re: set_task question
Reply With Quote #4

Just a helpful hint to make sure you send the entire array:

Code:
set_task( fTime, szFunc, iTaskID, iParams, sizeof iParams );
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
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 08:27.


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