Raised This Month: $ Target: $400
 0% 

Block buymenu access?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-31-2006 , 16:06   Block buymenu access?
Reply With Quote #1

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.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-31-2006 , 16:24  
Reply With Quote #2

Not sure, but try return PLUGIN_HANDLED on buy command.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
VEN
Veteran Member
Join Date: Jan 2005
Old 06-01-2006 , 08:12  
Reply With Quote #3

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.
VEN is offline
Dark Killer
Senior Member
Join Date: May 2005
Location: Kowloon, Hong Kong
Old 06-01-2006 , 08:38  
Reply With Quote #4

Check my (or Petey B's) AK vs. M4 (Right in New Plugin Submissions), it has a code to block buy.
__________________
Dark Killer is offline
unnamed :)
Member
Join Date: Apr 2006
Old 06-01-2006 , 12:36  
Reply With Quote #5

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; }
unnamed :) 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 16:28.


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