Raised This Month: $ Target: $400
 0% 

Is possible to forbid to buy the weapon from the console?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 07-29-2010 , 06:02   Is possible to forbid to buy the weapon from the console?
Reply With Quote #1

Is possible to forbid to buy the weapon from the console by "one command"?
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-29-2010 , 08:06   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #2

which command?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 07-29-2010 , 08:18   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #3

No, if you forbrid console command player won't be able to buy it with Buymenu.
But you can replaca buymenu with give_item commands etc... so it will be possible, when you make your own buymenu first.
Gadzislaw007 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-29-2010 , 11:12   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #4

Yes you can, when the command is fired, check player menuid pdata, if player is in buy menu, allow to buy the weapon.

List is there : http://forums.alliedmods.net/showthread.php?t=130708

Best would be to create a Trie, and set each weapon buy cmd to the corresponding menu index value.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-30-2010 at 13:55.
ConnorMcLeod is offline
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 07-29-2010 , 11:38   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #5

This is kinda complicated, you have to block each weapon and them unlock it, when somebody is in right buymenu section. In other way they will be able to use bind just after opening buymenu.
Gadzislaw007 is offline
-=hunter=-
Senior Member
Join Date: Jul 2008
Old 07-30-2010 , 04:13   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #6

I originally wanted to use Trie for forbid weapons but thought that there is a more compact way. Already done with Trie as said ConnorMcLeod. I like to use Trie
-=hunter=- is offline
Send a message via ICQ to -=hunter=- Send a message via Skype™ to -=hunter=-
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-30-2010 , 10:49   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #7

As Gadzislaw007, players ugins VGUI menus gonna send same commands as if they typed in console, that's why you HAVE TO filter by pdata menu id (at least).
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 07-30-2010 , 12:15   Re: Is possible to forbid to buy the weapon from the console?
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
meniid
I hate automatic correcteurs too.
Seta00 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 14:32.


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