Raised This Month: $ Target: $400
 0% 

Solved Events when player drop gun


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 03-23-2017 , 05:27   Re: Events when player drop gun
Reply With Quote #1

You already have falsing on drop in Forward_SetModel.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Depresie
Veteran Member
Join Date: Nov 2013
Old 03-24-2017 , 10:19   Re: Events when player drop gun
Reply With Quote #2

Quote:
Originally Posted by PRoSToTeM@ View Post
You already have falsing on drop in Forward_SetModel.
Code:
public Forward_SetModel( pEntity, const pModel[ ] ) 
{ 
    if( !pev_valid( pEntity ) )  
    { 
        return FMRES_IGNORED; 
    }     
     
    static szClassName [ 33 ] 
    pev( pEntity, pev_classname, szClassName, charsmax(szClassName) ); 
         
    if( !equal ( szClassName, "weaponbox" ) ) 
    { 
        return FMRES_IGNORED; 
    }     
     
    static pOwner , pModel 
    pModel = fm_find_ent_by_owner ( -1, WEAPON_BASE_NAME, pEntity ); 
    pOwner = pev ( pEntity, pev_owner ); 
     
    if ( g_pWeaponA [ pOwner ]  && pev_valid ( pModel ) ) 
    { 
        set_pev( pModel , pev_impulse , WEAP_KEY ); 
        engfunc( EngFunc_SetModel, pEntity, W_MODEL ); 
         
        g_pWeaponA [ pOwner ]   = false; 
        return FMRES_SUPERCEDE; 
    } 

    return FMRES_IGNORED; 
}
For the rest of the peeps who still didn't understand, it is already handled in the first code, take a look at the red line
__________________

Last edited by Depresie; 03-24-2017 at 10:20.
Depresie 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 18:02.


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