Raised This Month: $ Target: $400
 0% 

Help please - cstrike to fakemeta


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
patrig
Junior Member
Join Date: Sep 2011
Old 11-17-2011 , 11:36   Help please - cstrike to fakemeta
Reply With Quote #1

Hello, tell me please. Want to change a plug fakemet `y, but it does not work ( problem with cartridges ).

cstrike:
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta_util >
#include < cstrike >

public plugin_init( )
{
    
register_plugin"""""" )
    
    
register_messageget_user_msgid"CurWeapon" ), "CurWeapon" )
}

public 
CurWeaponmsg_idmsg_destiPlayer )
{
    new 
wpn get_msg_arg_int)

    if( !( 
wpn <= 30 ) )
        return 
PLUGIN_CONTINUE;

    static 
client_oldwpn33 ]        

    
client_oldwpniPlayer ] = wpn

    
if( wpn == CSW_C4 || wpn == CSW_HEGRENADE || wpn == CSW_FLASHBANG || wpn == CSW_SMOKEGRENADE ||    wpn == CSW_KNIFE )
        return 
PLUGIN_CONTINUE;

    new 
wpn_name17 ]
    
get_weaponnamewpnwpn_name16 )

    new 
wpn_id fm_find_ent_by_owner( -1wpn_nameiPlayer )
    if( !
wpn_id ) return PLUGIN_CONTINUE;

    new 
clip get_msg_arg_int)
    new 
maxammo 4

    
if( wpn == CSW_USP || wpn == CSW_M4A1 || wpn == CSW_TMP )
    {
        if( 
wpn != CSW_TMP cs_set_weapon_silenwpn_id1)
        
maxammo 8

        
if( iPlayer 33 )
        {
            if( ( 
is_user_adminiPlayer ) ) )
            {
                
cs_set_weapon_ammowpn_id12 )
                if( 
clip != 12 )return PLUGIN_HANDLED;
                
set_msg_arg_int3ARG_BYTE12 )
                return 
PLUGIN_CONTINUE;
            }
        }
    }

    
cs_set_user_bpammoiPlayerwpnmaxammo clip )
    if( 
clip maxammo )
    {
        
set_msg_arg_int3ARG_BYTEmaxammo )
        
cs_set_weapon_ammowpn_idmaxammo )
    }

    return 
PLUGIN_CONTINUE;

fakemeta ( does not work ):
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta_util >
#include < fm_cstrike >

public plugin_init( )
{
    
register_plugin"""""" )
    
    
register_messageget_user_msgid"CurWeapon" ), "CurWeapon" )
}

public 
CurWeaponmsg_idmsg_destiPlayer )
{
    new 
wpn get_msg_arg_int)

    if( !( 
wpn <= 30 ) )
        return 
PLUGIN_CONTINUE;

    static 
client_oldwpn33 ]        

    
client_oldwpniPlayer ] = wpn

    
if( wpn == CSW_C4 || wpn == CSW_HEGRENADE || wpn == CSW_FLASHBANG || wpn == CSW_SMOKEGRENADE ||    wpn == CSW_KNIFE )
        return 
PLUGIN_CONTINUE;

    new 
wpn_name17 ]
    
get_weaponnamewpnwpn_name16 )

    new 
wpn_id fm_find_ent_by_owner( -1wpn_nameiPlayer )
    if( !
wpn_id ) return PLUGIN_CONTINUE;

    new 
clip get_msg_arg_int)
    new 
maxammo 4

    
if( wpn == CSW_USP || wpn == CSW_M4A1 || wpn == CSW_TMP )
    {
        if( 
wpn != CSW_TMP fm_cs_set_weapon_silenwpn_id1)
        
maxammo 8

        
if( iPlayer 33 )
        {
            if( ( 
is_user_adminiPlayer ) ) )
            {
                
fm_cs_set_weapon_ammowpn_id12 )
                if( 
clip != 12 )return PLUGIN_HANDLED;
                
set_msg_arg_int3ARG_BYTE12 )
                return 
PLUGIN_CONTINUE;
            }
        }
    }

    
fm_cs_set_user_bpammoiPlayerwpnmaxammo clip )
    if( 
clip maxammo )
    {
        
set_msg_arg_int3ARG_BYTEmaxammo )
        
fm_cs_set_weapon_ammowpn_idmaxammo )
    }

    return 
PLUGIN_CONTINUE;

Many thanks in advance. Sorry for my English.

Last edited by patrig; 11-17-2011 at 11:38.
patrig is offline
Send a message via Skype™ to patrig
 



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 08:27.


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