Raised This Month: $ Target: $400
 0% 

Solved what is written on this line is not executed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Itz
Junior Member
Join Date: Apr 2021
Old 05-23-2021 , 23:28   Re: what is written on this line is not executed
Reply With Quote #7

Quote:
Originally Posted by Celena Luna View Post
Add in this 2 places:
Code:
public Forward_SetModel( pEntity, pModel[]) {     if( !is_valid_ent( pEntity ) )     {         return FMRES_IGNORED;     }             static szClassName [ 33 ]     entity_get_string( pEntity, EV_SZ_classname, szClassName, charsmax ( szClassName ) )             if( !equal ( szClassName, "weaponbox" ) )     {         return FMRES_IGNORED;     }             static pOwner , pModel         pModel = find_ent_by_owner ( -1, WEAPON_BASE_NAME, pEntity );         pOwner = entity_get_edict(pEntity, EV_ENT_owner)         if ( g_pWeaponA [ pOwner ]  && is_valid_ent ( pModel ) )     {         entity_set_int( pModel, EV_INT_impulse, WEAP_KEY);                 entity_set_model( pEntity, W_MODEL_ETHEREAL);         g_pWeaponA [ pOwner ]  = false;         g_has_ethereal[pOwner] = false;                 return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; }

And

Code:
public CBaseWeapon__AddToPlayer__Pre( pEnity , pPlayer ) {     if( !pev_valid( pEnity ) && !is_user_connected( pPlayer ) )     {          return HAM_IGNORED;     }         if( pev( pEnity, pev_impulse ) == WEAP_KEY || g_pWeaponA[ pPlayer ] )     {         g_pWeaponA[ pPlayer ] = true;         g_has_ethereal[pPlayer] = true;                 UTIL__WeaponList( pPlayer,  "weapon_ethereal" , 6, AMMO_WEAPON, -1, -1, 0 , 15, g_iWeaponID , 0 );         return HAM_HANDLED;     }     else     {         UTIL__WeaponList( pPlayer, WEAPON_BASE_NAME , 6, AMMO_WEAPON, -1, -1, 0 , 15, g_iWeaponID , 0 );     }         return HAM_IGNORED; }

And to be honest, g_pWeaponA is g_has_ethereal already
Now it's working perfectly

Thank you for your help
Itz 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 02:35.


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