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

Can I select all bool in 1 command?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KuvZz
Member
Join Date: Sep 2013
Location: Spain
Old 10-03-2015 , 11:13   Can I select all bool in 1 command?
Reply With Quote #1

Hello guys. Is it possible select all booleans?
For example
PHP Code:
new boolb_1[33]
new 
boolb_2[33]
new 
boolb_3[33]
//Anywhere...
b_(all_of_them)[id] = true 
__________________

Last edited by KuvZz; 10-03-2015 at 11:14.
KuvZz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-03-2015 , 11:26   Re: Can I select all bool in 1 command?
Reply With Quote #2

Quote:
Originally Posted by KuvZz View Post
Hello guys. Is it possible select all booleans?
For example
PHP Code:
new boolb_1[33]
new 
boolb_2[33]
new 
boolb_3[33]
//Anywhere...
b_(all_of_them)[id] = true 
To set 3 arrays like you have above using a bit-field:
PHP Code:
new b_all];
        
arraysetb_all , -sizeofb_all ) ); 
__________________

Last edited by Bugsy; 10-03-2015 at 11:38.
Bugsy is offline
KuvZz
Member
Join Date: Sep 2013
Location: Spain
Old 10-03-2015 , 11:36   Re: Can I select all bool in 1 command?
Reply With Quote #3

Okay, thanks
__________________
KuvZz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-03-2015 , 11:45   Re: Can I select all bool in 1 command?
Reply With Quote #4

Quote:
Originally Posted by KuvZz View Post
Okay, thanks
You could do it similarly using arrays like you have, but it would be 3 native calls.
PHP Code:
new boolb_1[33]
new 
boolb_2[33]
new 
boolb_3[33]
    
arraysetb_1 true sizeofb_1 ) ); 
arraysetb_2 true sizeofb_2 ) ); 
arraysetb_3 true sizeofb_3 ) ); 
__________________
Bugsy is offline
KuvZz
Member
Join Date: Sep 2013
Location: Spain
Old 10-03-2015 , 11:50   Re: Can I select all bool in 1 command?
Reply With Quote #5

Ok, using 1 is better I guess. Thanks again.
__________________
KuvZz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-03-2015 , 11:53   Re: Can I select all bool in 1 command?
Reply With Quote #6

Yes, but it requires a little knowledge of using bit fields. ie, how to set, check, clear values etc.
__________________
Bugsy is offline
KuvZz
Member
Join Date: Sep 2013
Location: Spain
Old 10-03-2015 , 11:55   Re: Can I select all bool in 1 command?
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Yes, but it requires a little knowledge of using bit fields. ie, how to set, check, clear values etc.
I forgot all about pawn but I can try and remember xD
Thanks btw
__________________
KuvZz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-03-2015 , 11:58   Re: Can I select all bool in 1 command?
Reply With Quote #8

Bit operations are not specific to Pawn. If you know it, you know it.
__________________
Bugsy 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 08:30.


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