Raised This Month: $ Target: $400
 0% 

time is up


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 02-08-2007 , 19:43   time is up
Reply With Quote #1

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
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 02-09-2007 , 12:30   Re: time is up
Reply With Quote #2

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 }
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 02-09-2007 , 13:12   Re: time is up
Reply With Quote #3

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"
[ --<-@ ] Black Rose is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 02-09-2007 , 22:17   Re: time is up
Reply With Quote #4

thx guys
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow 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 00:42.


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