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

Menu question


Post New Thread Reply   
 
Thread Tools Display Modes
h3bus
AlliedModders Donor
Join Date: Nov 2013
Old 12-12-2014 , 02:56   Re: Menu question
Reply With Quote #11

If you want, to be called like this:
PHP Code:
SetPanelKeysList(hPanel, [459]); 
PHP Code:
stock SetPanelKeysList(Handle:hPanel, const keys[], size sizeof(keys))
{
    new 
keysMask 0;
    for(new 
index 0index sizeindex++)
       
keysMask |= << (keys[index] - 1);

    
SetPanelKeys(hPanelkeysMask);

Not tested (not even compiled)

Last edited by h3bus; 12-12-2014 at 02:56.
h3bus is offline
sim242
AlliedModders Donor
Join Date: Dec 2012
Location: England
Old 12-12-2014 , 03:32   Re: Menu question
Reply With Quote #12

Quote:
Originally Posted by Black-Rabbit View Post
Because that not how it work... Powerlord could have not explain you it better, just read and pay attention to what he just told you.
There's no need to get an attitude man.. I'm aware Powerlord explained HOW to set the buttons but my question was why doesn't it allow just the raw number of the button you want, in which case he didn't answer my question. A simple "It doesn't allow those to be passed, you have to use blabla" is fine.

I'm more than capable of paying attention and I read what he told me. Maybe you need to read what I asked instead of getting an attitude over the forums.

Thanks for the help Powerlord.
__________________
Steam - Sim
Request a private plugin
Not accepting requests at this time
sim242 is offline
Send a message via Skype™ to sim242
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 12-12-2014 , 09:35   Re: Menu question
Reply With Quote #13

I did not try to get an attitude, I just want to say the answer of your question was in powerlord explanation, it bit switching, not multiple variables or parameters but indeed you can create your own function as showed above, just take account that bit 9 = 0 (little modification in the code above). We are just trying to help you out, anyway sorry if it sounded offensive.

Last edited by Mathias.; 12-12-2014 at 09:39.
Mathias. is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-12-2014 , 09:39   Re: Menu question
Reply With Quote #14

Quote:
Originally Posted by sim242 View Post
There's no need to get an attitude man.. I'm aware Powerlord explained HOW to set the buttons but my question was why doesn't it allow just the raw number of the button you want, in which case he didn't answer my question. A simple "It doesn't allow those to be passed, you have to use blabla" is fine.

I'm more than capable of paying attention and I read what he told me. Maybe you need to read what I asked instead of getting an attitude over the forums.

Thanks for the help Powerlord.
It's because SourceMod was written to use flags instead of varargs whenever possible. It also happens that the client-side implementation needs that as a bitfield (which are usually populated by flags).

Now, it could be made more obvious by having an enum or constants of those, but it'd just be things like SendKeys_One, SendKeys_Two, etc... if they did make it.
__________________
Not currently working on SourceMod plugin development.
Powerlord 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:49.


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