Raised This Month: $ Target: $400
 0% 

What happened to "set_task"?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-15-2007 , 08:09   What happened to "set_task"?
Reply With Quote #1

There was a great command called "set_task" in AMX, but I couldn't find anything like that in SourceMod. What happened to that function? Is there anything else I can use? I looked at timers.inc, but I think these functions are for something different. I just want to run a command like "playerstimeisover(client)" after "x" seconds.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-15-2007 , 10:12   Re: What happened to "set_task"?
Reply With Quote #2

CreateTimer()

CreateTimer(time, whatFunctionToCall, stuff);

CreateTimer(30.0, Timer_BURN, client); // Burn player in 30 seconds!

public Action:Timer_BURN(Handle:timer, client)
{
IgniteClient(client);
}
__________________
I'm a blast from the past!
ferret is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-15-2007 , 22:49   Re: What happened to "set_task"?
Reply With Quote #3

Code:
public Action:Timer_BURN(Handle:timer, client) //to public Action:Timer_BURN(Handle:timer, any:client)
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-16-2007 , 06:22   Re: What happened to "set_task"?
Reply With Quote #4

Thanks.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
Xenogenetics
Member
Join Date: Jul 2007
Old 08-05-2007 , 20:01   Re: What happened to "set_task"?
Reply With Quote #5

Does CreateTimer go in public OnPluginStart() and if it does why do I get an error for undefined symbol "client" when I try CreateTimer(30.0, Timer_BURN, client);
Xenogenetics is offline
Peoples Army
SourceMod Donor
Join Date: Mar 2007
Old 08-05-2007 , 20:44   Re: What happened to "set_task"?
Reply With Quote #6

theres no id(client) in OnPluginStart , youd have to use it inside of a function that has a cleint id .
Peoples Army is offline
Xenogenetics
Member
Join Date: Jul 2007
Old 08-05-2007 , 21:41   Re: What happened to "set_task"?
Reply With Quote #7

Thats what I was thinking, thanks.
Xenogenetics is offline
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 21:51.


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