24/06/2019, 12:07 AM
hola a todos, estube poniendo la sencibilidad de la granada que explote al momento de tocar el suelo o solido, pero no diferencia al jugador mismo tirando la granada y quedando bugeada... ej: si voy caminando hacia adelante tirando la granada se me queda bugeada encima mio
saludos
Código PHP:
public ham_grenade_touch ( const e_Entity, const e_World )
{
static s_Model[ 32 ], i_Value, m_Type;
entity_get_string ( e_Entity, EV_SZ_model, s_Model, charsmax ( s_Model ) );
switch ( s_Model[ 9 ] )
{
case 'h': m_Type = NADE_HE;
case 'f': m_Type = NADE_FB;
case 's': m_Type = NADE_SG;
default: return HAM_IGNORED;
}
if ( ! ( i_Value = get_pcvar_num ( g_Cvars[ m_Type ] ) ) )
return HAM_IGNORED;
if ( ++gi_CountTouches[ e_Entity ] >= i_Value )
{
entity_set_float ( e_Entity, EV_FL_dmgtime, 0.0 );
gi_CountTouches[ e_Entity ] = 0;
return HAM_HANDLED;
}
return HAM_IGNORED;
}