Raised This Month: $ Target: $400
 0% 

Weapon animation is not displayed..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-14-2010 , 14:26   Re: Weapon animation is not displayed..
Reply With Quote #2

Dunno about your problem, tested your plugin with no problem.

I would optimize it though, don't need to store the string, just store the string index instead.
Also, don't use switch if you have like 55 cases...

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

const iMaxSlots 32;
new 
g_iWeaponModeliMaxSlots+];

public 
plugin_init( )
{
    
register_plugin"Zoomed Models Fix""0.1.1""DruX" );
    
    
register_event"SetFOV" "Event_SetFOV" "be" );

    
// use new so the memory is free when you exit current function    
    
new szWeaponName20 ]; // weapon_smokegrenade = 19
    
    
for ( new CSW_P228<= CSW_P90i++ )
    {
        if( 
get_weaponnameiszWeaponNamecharsmaxszWeaponName ) ) )
        {
            
RegisterHamHam_Item_DeployszWeaponName"HamFwd_Item_Deploy_Post");
        }
    }
}

public 
Event_SetFOVid )
{
    if ( 
get_user_weaponid ) )
    {
        if( 
read_data(1) < 55 )
        {
            
set_pev(idpev_viewmodel0);
        }
        else if( !
pev(idpev_viewmodel) )
        {
            
set_pev(idpev_viewmodelg_iWeaponModel[id]);
        }
    }
}

public 
HamFwd_Item_Deploy_PostiEnt )
{
    const 
XTRA_OFS_WEAPON 4;
    const 
m_pPlayer 41;

    new 
id get_pdata_cbaseiEntm_pPlayerXTRA_OFS_WEAPON );
    
g_iWeaponModel[id] = pev(idpev_viewmodel);

__________________
- tired and retired -

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


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