Raised This Month: $ Target: $400
 0% 

[REQ] Enable/disable command for this plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-05-2014 , 15:49   Re: [REQ] Enable/disable command for this plugin
Reply With Quote #16

Quote:
Originally Posted by HamletEagle View Post
Can you please explain why this is overkill ? I mean, an automaton can't eat so many memory, does it ?
It makes the code much much less readable and provides not real benefit.

Actually, I just realized that it is actually completely wrong. Your function changes the rendering of a single player but you are changing the state of the command on a global level. So, if Player1 executes the command, you glow Player1. Then, if Player2 uses the command, they unglow Player2. Then, if Player1 uses the command again, they glow themselves again (but they are already glowing because they were never unglowed).

The original request merely needed to add two commands. One command to remove the original task and another to re-enable the original task (which can obviously be done with a single function for toggling a boolean). That's it. In addition, the for loop needs to be converted to using get_players().
__________________

Last edited by fysiks; 09-05-2014 at 15:54.
fysiks is online now
 



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 18:01.


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