Raised This Month: $ Target: $400
 0% 

Menu keys for sg550 & g3sg1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiLuJe
Veteran Member
Join Date: Mar 2004
Location: Paris, France
Old 05-29-2004 , 07:53   Menu keys for sg550 & g3sg1
Reply With Quote #1

Hello ;) I'm trying to modify the awp limiter plugin, so it can also limits the auto snipers, everything is working, except that i don't know the keys for these weapons in the menu ...

Here is the key for the AWP...
Code:
register_menucmd(-31,1<<5,"menu_sl_awp")
NiLuJe is offline
Send a message via MSN to NiLuJe
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 05-29-2004 , 10:44  
Reply With Quote #2

Yes that would be good for me to know also so I can restrict them
__________________

BigBaller is offline
NiLuJe
Veteran Member
Join Date: Mar 2004
Location: Paris, France
Old 05-29-2004 , 10:59  
Reply With Quote #3

Yeah i'm not alone
NiLuJe is offline
Send a message via MSN to NiLuJe
NiLuJe
Veteran Member
Join Date: Mar 2004
Location: Paris, France
Old 05-31-2004 , 14:12  
Reply With Quote #4

Hu, damn 1.6, they are changing depending on the team :/

CT :

AWP : 1<<5
SG550 : 1<<4
G3SG1 : Doesn't exist xD [ 1<<-1 }

T :

AWP : 1<<4
SG550 : Doesn't exist xD [ 1<<-1 }
G2SG1 : 1<<5

... Now i must find a way to make them change depending of the team in my register_menucmd .. Oo Any Idea?
NiLuJe is offline
Send a message via MSN to NiLuJe
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-31-2004 , 14:18  
Reply With Quote #5

logical flow:
1<<-1 = 1>> 1 = 0
__________________
hello, i am pm
PM is offline
NiLuJe
Veteran Member
Join Date: Mar 2004
Location: Paris, France
Old 05-31-2004 , 14:24  
Reply With Quote #6

Hu ? Need an explanation Oo
NiLuJe is offline
Send a message via MSN to NiLuJe
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 05-31-2004 , 16:08  
Reply With Quote #7

You said
1<<-1
<< is the bit shift left operator
so when you pass it a negative value, it should logically shift right
=> 1<<-1 = 1>>1
but 1>>1 in binary: 00000001>>1
Because the left bits are filled with 0 when shifting right, 1>>1 will be 0

Idea:
Register both of them and decide when the public is run
__________________
hello, i am pm
PM is offline
NiLuJe
Veteran Member
Join Date: Mar 2004
Location: Paris, France
Old 05-31-2004 , 16:21  
Reply With Quote #8

Ahhhh, okay ;)

EDIT: Got It ;)

Code:
   new team = get_user_team(id) 
   
   if((team == 2 && key==5) || (team == 1 && key==4)) {
   //etc
   }
And the registers:
Code:
    register_menucmd(-31,(1<<4),"menu_sl_snip")
    register_menucmd(-31,(1<<5),"menu_sl_snip") 
    register_menucmd(register_menuid("BuyRifle" , 1 ), (1<<4), "menu_sl_snip" )
    register_menucmd(register_menuid("BuyRifle" , 1 ), (1<<5), "menu_sl_snip" )
NiLuJe is offline
Send a message via MSN to NiLuJe
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 07:02.


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