AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block buymenu access? (https://forums.alliedmods.net/showthread.php?t=29189)

SweatyBanana 05-31-2006 16:06

Block buymenu access?
 
How would I block the buy menu with a plugin...Im makin a gangster mod and im addin a buy menu but I dont want them to be able to use the regular ones.

Hawk552 05-31-2006 16:24

Not sure, but try return PLUGIN_HANDLED on buy command.

VEN 06-01-2006 08:12

It's possible to block client's buy/buyequip commands but it's not possible to block main VGUI buy menu because it's handled on client's side.

Dark Killer 06-01-2006 08:38

Check my (or Petey B's) AK vs. M4 (Right in New Plugin Submissions), it has a code to block buy.

unnamed :) 06-01-2006 12:36

Code:
#include <amxmodx> #include <amxmisc> public plugin_init() {     register_clcmd("buy", "hook_block")     register_clcmd("buyammo1", "hook_block")     register_clcmd("buyammo2", "hook_block")     register_clcmd("buyequip", "hook_block")     register_clcmd("nightvision", "hook_block")     register_clcmd("cl_setautobuy","hook_block")     register_clcmd("cl_autobuy","hook_block")     register_clcmd("cl_setrebuy","hook_block")     register_clcmd("cl_rebuy","hook_block")     remove_buyzone() }   public hook_block() {     return PLUGIN_CONITNUE } public remove_buyzone() {     for(new i=0;i<=get_maxentities();i++) {         if(!is_entity(i)) continue         new class[33]         entity_get_string(i,EV_SZ_classname,class,32)         if(equal(class,"func_buyzone"))             remove_entity(i)     }     return 1; }


All times are GMT -4. The time now is 16:28.

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