Raised This Month: $ Target: $400
 0% 

[HELP] No Weapon Buy


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-03-2010 , 23:26   Re: [HELP] No Weapon Buy
Reply With Quote #7

If you are planning on adding restrictions for other weapons let me know.

Edit: Updated code using cstrike module instead of fakemeta
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#define FLAG_ALLOW        ADMIN_LEVEL_H

public plugin_init() 
{
    
register_plugin"Block AWP Purchase" "0.1" "bugsy" );
    
    
RegisterHamHam_AddPlayerItem ,"player" ,"fw_AddPlayerItem" );
}

public 
fw_AddPlayerItemiPlayer iItem )
{
    if ( 
get_user_flagsiPlayer ) & FLAG_ALLOW )
        return 
HAM_IGNORED;

    if ( 
cs_get_weapon_idiItem ) == CSW_AWP )
    {    
        
set_task0.15 "ReimburseMoney" iPlayer );
        
client_printiPlayer print_chat "* You are restricted from using AWP!" );
        
SetHamReturnInteger); 
        
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;
}

public 
ReimburseMoneyid )
{
    
cs_set_user_moneyid clamp( ( cs_get_user_moneyid ) + 4750 ) , 4750 16000 ) , );

__________________

Last edited by Bugsy; 02-05-2010 at 09:22.
Bugsy is offline
 



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 07:24.


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