AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   time is up (https://forums.alliedmods.net/showthread.php?t=51000)

kp_uparrow 02-08-2007 19:43

time is up
 
Code:
public plugin_init(){                           register_plugin("Time is up!!","1.0","kp_uparrow")     register_cvar("sv_timesup","1")     register_event("HLTV", "new_reset", "a", "1=0", "2=0")\     register_event("SendAudio","new_reset","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")         return PLUGIN_CONTINUE } public  bomb_planted() {     remove_task (0,0) } public new_reset(){             if(get_cvar_num("sv_timesup")==1)     {     remove_task (0,0)     set_task(get_cvar_float("mp_roundtime")*60+5.0,"slay")     }     return PLUGIN_CONTINUE } public slay() {

i need to make sure that this task removed on round end/new round/bomb plant

just need to make sure, and that it does not remove tasks from other plugins

thx

Rolnaaba 02-09-2007 12:30

Re: time is up
 
to make sure you remove the task you want do the following...give it a task id.
ie:
Code:
public plugin_init(){                           register_plugin("remove task","1.0","Rolnaaba")   } func_1() {     remove_task (111) //use task id to remove specific set-task } func_2(){     set_task(1.0,"func_1",111) //third argument = task id }

[ --<-@ ] Black Rose 02-09-2007 13:12

Re: time is up
 
PHP Code:

register_event("SendAudio","new_reset","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw"

-->
PHP Code:

register_event("SendAudio","new_reset","a","1=0"


kp_uparrow 02-09-2007 22:17

Re: time is up
 
thx guys


All times are GMT -4. The time now is 00:42.

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