AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   remove_task (https://forums.alliedmods.net/showthread.php?t=53877)

Alka 04-12-2007 13:43

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

(note:Task is for victim) :P
Thanks...

teame06 04-12-2007 13:51

Re: remove_task
 
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)

Alka 04-12-2007 14:04

Re: remove_task
 
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

teame06 04-12-2007 14:13

Re: remove_task
 
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.

Alka 04-12-2007 14:41

Re: remove_task
 
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 :wink:

teame06 04-12-2007 14:46

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

I think you should read this.


All times are GMT -4. The time now is 06:41.

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