Raised This Month: $51 Target: $400
 12% 

Block buyzone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tonda
Senior Member
Join Date: Aug 2009
Old 01-28-2011 , 15:31   Block buyzone
Reply With Quote #1

How can i block buizone in game?
Tonda is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-28-2011 , 15:36   Re: Block buyzone
Reply With Quote #2

Try this :

PHP Code:
#include <amxmodx>
#include <engine>

#define VERSION "0.0.1"
#define PLUGIN "No Buy"

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_clcmd("buy""ClientCommand_Buy")
    
register_clcmd("bUy""ClientCommand_Buy")
    
register_clcmd("buY""ClientCommand_Buy")
    
register_clcmd("bUY""ClientCommand_Buy")
    
register_clcmd("Buy""ClientCommand_Buy")
    
register_clcmd("BUy""ClientCommand_Buy")
    
register_clcmd("BuY""ClientCommand_Buy")
    
register_clcmd("BUY""ClientCommand_Buy")

    new 
iEnt find_ent_by_class(-1"info_map_parameters")
    if( 
iEnt <= )
    {
        
iEnt create_entity("info_map_parameters")
    }
    
DispatchKeyValue(iEnt"buying""3")
}

public 
ClientCommand_Buy/* id */ )
{
    return 
PLUGIN_HANDLED_MAIN

If you don't register all buy cmds, then, buy menu will be openable but not usable.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-28-2011 at 15:50.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-28-2011 , 15:49   Re: Block buyzone
Reply With Quote #3

if( iEnt <= )
__________________
Arkshine is offline
Tonda
Senior Member
Join Date: Aug 2009
Old 01-28-2011 , 15:51   Re: Block buyzone
Reply With Quote #4

hm, compile error
Tonda is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-28-2011 , 15:53   Re: Block buyzone
Reply With Quote #5

Try again. Plugin has been edited.
__________________
Arkshine is offline
Old 01-28-2011, 15:54
Erdener
This message has been deleted by Erdener.
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-28-2011 , 15:56   Re: Block buyzone
Reply With Quote #6

Erdener, please avoid to answer if you don't know what you are doing. You put the exact old code containing a typo.
__________________
Arkshine is offline
Erdener
Senior Member
Join Date: Apr 2010
Location: Turkey
Old 01-28-2011 , 15:59   Re: Block buyzone
Reply With Quote #7

No need to warn , My message erased...
__________________
Erdener is offline
Tonda
Senior Member
Join Date: Aug 2009
Old 01-28-2011 , 16:48   Re: Block buyzone
Reply With Quote #8

ok,i try it but still buy zone work :-/
Tonda is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-28-2011 , 16:50   Re: Block buyzone
Reply With Quote #9

With this plugin, that's not possible to buy.
__________________
Arkshine is offline
ImXinR
Member
Join Date: Dec 2010
Old 01-28-2011 , 20:26   Re: Block buyzone
Reply With Quote #10

Previously I've posted something similiar to your thread , And someone named JocAnis gave me this "code" which strip users $$$ so that they are unable to buy weapon. Maybe you can try this? But make sure sv_cheats is 0 . Thread :

Strip Users Money

PHP Code:
/* Plugin generated by AMXX-Studio */ 

#include <amxmodx> 
#include <amxmisc> 
#include <hamsandwich> 
#include <cstrike> 

#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "author" 

#pragma semicolons 1 

public plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR); 
     
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1); 
     
    
register_clcmd"buy""BlockBuy" ); 


public 
fwHamPlayerSpawnPostid 

    if ( 
is_user_connectedid ) ) 
    { 
        
cs_set_user_moneyid); 
    } 
    return 
PLUGIN_HANDLED


public 
BlockBuyid 

    return 
PLUGIN_HANDLED

__________________
Sometimes , Life Sucks .. Don't You Agree? But ,
Listening To Music Make Us Feel Better
ImXinR 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 18:38.


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