Raised This Month: $ Target: $400
 0% 

preventing from buying and hide/delete money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fl0werD
Senior Member
Join Date: May 2011
Old 05-26-2013 , 11:56   Re: preventing from buying and hide/delete money
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >


public plugin_init( )
{
    
register_message102"MSG_Money" );
    
register_message107"MSG_StatusIcon" );

    
RegisterHamHam_Spawn"player""CPlayer__Spawn_Post", .Post );
}

public 
CPlayer__Spawn_PostiPlayer )
{
    if( !
is_user_aliveiPlayer ) )
        return;

    
set_task0.4"CTask__HideMoney"iPlayer +500 );
}

public 
CTask__HideMoneyiTask )
{
    new 
iPlayer iTask 500;

    if( 
is_user_aliveiPlayer ) )
    {
        
message_beginMSG_ONE94_iPlayer ); // 94 - HideWeapon.
        
write_byte1<<); // (1<<5)  -  Money, +
        
message_end( );

        
message_beginMSG_ONE110_iPlayer ); // 110 - Crosshair.
        
write_byte); // Removes a crosshair ( Like in spectator mode ).
        
message_end( );
    }
}

public 
MSG_Moneymsg_idMSG_DESTiPlayer )
{
    
set_pdata_intiPlayer1150); // 115 - m_iAccount
    
return PLUGIN_HANDLED;
}

public 
MSG_StatusIconmsg_idMSG_DESTiPlayer )
{
    new 
szIcon];
    
get_msg_arg_string2szIconcharsmaxszIcon ) );

    if( 
szIcon] == 'b' && szIcon] == 'y' && szIcon] == 'z' )
    {
        if( 
get_msg_arg_int) )
        {
            
// 235 - m_fClientMapZone, ( 1<<0 ) - Player in buy zone.
            
set_pdata_intiPlayer235get_pdata_intiPlayer235) & ~( 1<<), );
            return 
PLUGIN_HANDLED;
        }
    }

    return 
PLUGIN_CONTINUE;


Last edited by fl0werD; 05-26-2013 at 12:04.
fl0werD is offline
Send a message via ICQ to fl0werD
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:21.


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