AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   buy menu (https://forums.alliedmods.net/showthread.php?t=47276)

warchild690 11-13-2006 22:04

buy menu
 
Ok, I wrote a plugin that, in short(very short)strips all weapoms but and gives u a pistol, but the problem is, people can rebuy their weapons after they have been stripped. I know there is a way to restrict the buy menu for a map, but i want this to work on any map. I've looked around a bit and all i could find had to do with the map.

so my question: How would I go about restricting the buy menuso that you cant buy anything? set the buy time to 0? or is there something more complex than that?

jim_yang 11-13-2006 22:19

Re: buy menu
 
Code:


register_clcmd("buy", "generic_block")
register_clcmd("buyammo1", "generic_block")
register_clcmd("buyammo2", "generic_block")
register_clcmd("buyequip", "generic_block")
register_clcmd("cl_autobuy", "generic_block")
register_clcmd("cl_rebuy", "generic_block")
register_clcmd("cl_setautobuy", "generic_block")
register_clcmd("cl_setrebuy", "generic_block")
code from csdm_misc.sma
 
public generic_block(id, level, cid)
{
return PLUGIN_HANDLED // block any buy command, menu won't be shown.
}


warchild690 11-13-2006 22:23

Re: buy menu
 
thank you very much.

The Specialist 11-14-2006 00:14

Re: buy menu
 
also another way is to remove the buy zones , or set all the players money to 0 on spawn .

VEN 11-14-2006 13:28

Re: buy menu
 
jim_yang: this will not block buying fully, there is also numerous buy aliases like ak47, m4a1, etc...

The Specialist: this will not work in the all cases, not all maps use buyzone entities.

warchild690: You can use for example plugin "Buyzone Range", it able to restrict buying fully and it easy to use.

warchild690 11-15-2006 21:08

Re: buy menu
 
ah, thank you everybody. I will check out that plugin VEN.


All times are GMT -4. The time now is 06:49.

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