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

How I can block buy commands for CT team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 02-13-2010 , 07:53   How I can block buy commands for CT team
Reply With Quote #1

Hello, I would like to know how to block a command for counter terrorists and terrorists to use it with a friend rather tried methods, but unfortunately failed. So, if anyone knows how let me say it. Please do not give me links to plugins, but just if you know how it give me the code. Thanks in advance!
dark_style is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 02-13-2010 , 08:32   Re: How I can block buy commands for CT team
Reply With Quote #2

PHP Code:
/* Credits: Connor */

#include <amxmodx>
#include <cstrike>
#include <fakemeta>

#if cellbits == 32
    #define OFFSET_BUYZONE 235
#else
    #define OFFSET_BUYZONE 268
#endif

public plugin_init() {
    
register_plugin("No buy for CT""1.0""Juice")
    
    
register_messageget_user_msgid"StatusIcon" ), "msgStatusIcon" );
}

public 
msgStatusIcon( const iMsgId, const iMsgDest, const iPlayer )
{
    if( 
cs_get_user_teamiPlayer ) == CS_TEAM_CT 
    {
        static 
szMsg];
        
get_msg_arg_string2szMsg);
    
        if( 
equalszMsg"buyzone" ) )
        {
            
set_pdata_intiPlayerOFFSET_BUYZONEget_pdata_intiPlayerOFFSET_BUYZONE ) & ~( 1<<) );
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;

lazarev is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 02-13-2010 , 09:02   Re: How I can block buy commands for CT team
Reply With Quote #3

Quote:
Originally Posted by lazarev View Post
PHP Code:
/* Credits: Connor */

#include <amxmodx>
#include <cstrike>
#include <fakemeta>

#if cellbits == 32
    #define OFFSET_BUYZONE 235
#else
    #define OFFSET_BUYZONE 268
#endif

public plugin_init() {
    
register_plugin("No buy for CT""1.0""Juice")
    
    
register_messageget_user_msgid"StatusIcon" ), "msgStatusIcon" );
}

public 
msgStatusIcon( const iMsgId, const iMsgDest, const iPlayer )
{
    if( 
cs_get_user_teamiPlayer ) == CS_TEAM_CT 
    {
        static 
szMsg];
        
get_msg_arg_string2szMsg);
    
        if( 
equalszMsg"buyzone" ) )
        {
            
set_pdata_intiPlayerOFFSET_BUYZONEget_pdata_intiPlayerOFFSET_BUYZONE ) & ~( 1<<) );
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;

Very thanks.
dark_style 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 22:45.


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