AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is possible to forbid to buy the weapon from the console? (https://forums.alliedmods.net/showthread.php?t=133833)

-=hunter=- 07-29-2010 06:02

Is possible to forbid to buy the weapon from the console?
 
Is possible to forbid to buy the weapon from the console by "one command"?

drekes 07-29-2010 08:06

Re: Is possible to forbid to buy the weapon from the console?
 
which command?

Gadzislaw007 07-29-2010 08:18

Re: Is possible to forbid to buy the weapon from the console?
 
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.

ConnorMcLeod 07-29-2010 11:12

Re: Is possible to forbid to buy the weapon from the console?
 
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.

Gadzislaw007 07-29-2010 11:38

Re: Is possible to forbid to buy the weapon from the console?
 
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.

-=hunter=- 07-30-2010 04:13

Re: Is possible to forbid to buy the weapon from the console?
 
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 :)

ConnorMcLeod 07-30-2010 10:49

Re: Is possible to forbid to buy the weapon from the console?
 
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).

Seta00 07-30-2010 12:15

Re: Is possible to forbid to buy the weapon from the console?
 
Quote:

Originally Posted by ConnorMcLeod (Post 1255158)
meniid

I hate automatic correcteurs too.


All times are GMT -4. The time now is 00:15.

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