Raised This Month: $ Target: $400
 0% 

Help please - cstrike to fakemeta


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-17-2011 , 11:43   Re: Help please - cstrike to fakemeta
Reply With Quote #2

It's fine to use cstrike and is more efficient then fakemeta.
__________________

Last edited by Arkshine; 11-17-2011 at 11:43.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2011 , 11:50   Re: Help please - cstrike to fakemeta
Reply With Quote #3

And also it's better to use engine rather than fm_*** converted natives.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-17-2011 at 11:50.
ConnorMcLeod is offline
patrig
Junior Member
Join Date: Sep 2011
Old 11-17-2011 , 11:51   Re: Help please - cstrike to fakemeta
Reply With Quote #4

Well... thanks for the answer.
patrig is offline
Send a message via Skype™ to patrig
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-17-2011 , 11:52   Re: Help please - cstrike to fakemeta
Reply With Quote #5

Well.. you should read this : http://forums.alliedmods.net/showthread.php?t=88792
__________________
- tired and retired -

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


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