Raised This Month: $ Target: $400
 0% 

[Tutorial] How to PROPERLY make a self toggle command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-21-2014 , 02:48   Re: [Tutorial] How to PROPERLY make a toggle command
Reply With Quote #1

enabled = !enabled
if(enabled)
....

Or invert it in the if?
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
sdz
Senior Member
Join Date: Feb 2012
Old 01-21-2014 , 02:50   Re: [Tutorial] How to PROPERLY make a toggle command
Reply With Quote #2

Quote:
Originally Posted by friagram View Post
enabled = !enabled
if(enabled)
....

Or invert it in the if?
Something I learned in my time here is that the newer plugin developers are semi-braindead and require you to put everything in long terms, but yes your way would work I suppose, but it just looks alot weirder.. that and I just wanted to keep this as self-explanatory and basic as it could possibly get.

Last edited by sdz; 01-21-2014 at 02:52.
sdz 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 18:38.


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