Raised This Month: $ Target: $400
 0% 

remove_task


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-12-2007 , 13:43   remove_task
Reply With Quote #1

Hi.If i have the task : set_task(1.0, "Playsound",victim,"",0,"b"); how i make remove_task ?

(note:Task is for victim)
Thanks...
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 04-12-2007 at 13:51.
Alka is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-12-2007 , 13:51   Re: remove_task
Reply With Quote #2

Code:
remove_task(taskid, otherplugin)

If your task id is the player then you would use the player id as the taskid. If you need to remove a task from another plugin then you would need to set otherplugin to 1 otherwise leave it just use remove_task(taskid)
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-12-2007 , 14:04   Re: remove_task
Reply With Quote #3

Yeah...Thanks!but i want to remove it from victim! how to do this?
teame06:"If your task id is the player then you would use the player id as the taskid"
what do you mean? dunno
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-12-2007 , 14:13   Re: remove_task
Reply With Quote #4

Half-Life 1 mods uses player id. Which is pass from Damage Event, DeathMsg.

If your going to set the taskid with victim. Is Victim from an event or something?

Say victim is 1. Then you would use remove_task(1); If your going to remove it on round end you would need to iterate through every player checking if they are connected and remove the task.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-12-2007 , 14:41   Re: remove_task
Reply With Quote #5

Oh...ok! Thanks! 1 more thing : I can execute commands on conditions like this? =>>
Code:
new health = get_user_health(victim);
 
if(health < 10) { //conditon
  remove_task(victim+35435);
  client_cmd(victim,"stopsound"); //This is working in round start
 }
,because this is working on round start!

EDIT:no no no this is not in round start! that function "cleint_cmd(victim,"stopsound")" works on round start but not in that condition! Nwm thanks anyway
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 04-12-2007 at 14:50.
Alka is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-12-2007 , 14:46   Re: remove_task
Reply With Quote #6

http://forums.alliedmods.net/showthread.php?t=42159

I think you should read this.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
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 06:41.


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