Raised This Month: $51 Target: $400
 12% 

[INC] Customflags 0.6 Beta


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Impact123
Veteran Member
Join Date: Oct 2011
Location: Germany
Old 05-15-2012 , 19:03   [INC] Customflags 0.6 Beta
Reply With Quote #1

This is nothing special but i find it incredibly useful and wonder why nobody uses this technique (at least i didn't saw something like that in another plugin).
If you write big plugins, things can get complicated and you might end up with resetting 20 variables on ClientDisconnect.
I still don't know exactly how to use bitwise operators, which brought me to the idea to use them in my scripts.
This was intended as a "library" for my own includes, but i think this will be useful to someone else too.

Well, here is an simple example that should explain what the purpose of this includefile is.
Example #1



Notes
From what i've found out you can store ~30 flags until they start again from zero.
You can use this for example to limit native calls to things like: IsFakeClient, IsPlayerAlive, etc
Of course you can group your flags, for example:
Example


Changelog



Tell me what you think

Yours sincerely
Impact
Attached Files
File Type: inc customflags.inc (3.8 KB, 157 views)
__________________

Last edited by Impact123; 08-15-2012 at 21:24.
Impact123 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 04:35.


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