←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Jak inaczej ustawić przechodzenie entów pr...

GT Team's Photo GT Team 17.05.2013

if(pev_valid(ent) && get_distance_f(Origin, fOrigin15) <= 60.0 && (pev(ent, pev_monster_type) == BONUS || pev(ent, pev_monster_type) == BOSS) && pev_valid(iEnt))
		entity_set_int(iEnt, EV_INT_solid, SOLID_NOT)
		
	else if(pev_valid(iEnt))
		entity_set_int(iEnt, EV_INT_solid, SOLID_BBOX)
Mam taki kod, lecz gdy ustawi iEnt'owi solid_not to nie zadaje mu obrażeń. Da się to jakoś inaczej zrobić?
Quote

  • +
  • -
DarkGL's Photo DarkGL 17.05.2013

FM_ShouldCollide

http://forums.allied...ad.php?t=157558

 

Quote

GT Team's Photo GT Team 17.05.2013

register_forward( FM_ShouldCollide, "FwdShouldCollide" );  

public FwdShouldCollide( const iTouched, const iOther ) 
{ 
    if( IsPlayer( iTouched ) && IsPlayer( iOther ) ) 
    { 
        forward_return( FMV_CELL, 0 ); 
        return FMRES_SUPERCEDE; 
    } 
     
    return FMRES_IGNORED; 
}
Czyli mam zrobić tak? :
public FwdShouldCollide( const iTouched, const iOther ) 
{ 
    if( is_monster( iTouched ) && is_monster( iOther ) && pev(iOther, pev_monster_type) == BOSS) 
    { 
        forward_return( FMV_CELL, 0 ); 
        return FMRES_SUPERCEDE; 
    } 
     
    return FMRES_IGNORED; 
}
?
Quote