Raised This Month: $ Target: $400
 0% 

unregister_forward example question


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-08-2014 , 04:30   unregister_forward example question
Reply With Quote #1

Here's the deal, I have a jailbreak daysmenu plugin that uses
PHP Code:
register_forward(FM_PlayerPreThink"fwd_playerprethink"
, but only for two days. At the moment I am using if(checks day) inside it and that's horrible, so I'm asking if I can unregister the forward and only register it while the day starts?

How would that work? Could anyone give an example?

Fill this in for me please
Code:
public plugin_init() { register_forward(FM_PlayerPreThink, "fwd_playerprethink") } public days_start() { switch(day) { case 1: //need it here case 2: //don't need it here } } public days_end() { //??? }
aron9forever is offline
 



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 09:46.


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