View Single Post
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 11-18-2022 , 12:25   Re: Help about detecting enemy players
Reply With Quote #6

Quote:
Originally Posted by SaraAki View Post
Thank you for helping me.
Cant compile and you can see on this photo why.
try with this

PHP Code:

public effect_start(Entity)
{       
     if(
Entity 0
     
|| g_roundend)
                return

     static 
Float:Origin[3];
     
entity_get_vectorEntity0Origin );
                              
     static 
__int_Players[32], __int_Count__int_Teamvictim;

     
__int_Team get_user_teamClient );
     
get_players__int_Players__int_Count"a" );
    
     for( new 
i__int_Counti++ )
     {
        
victim __int_Players[i];
  
        if(
victim == Entity 
        
|| get_user_team(victim) == __int_Team 
        
|| g_effected[victim]
        || 
entity_rangeEntityvictim ) > RADIUS )
        { continue } 
                                            
         static 
Float:VictimOrigin[3];
         
entity_get_vectorvictim0VictimOrigin );
                    
         static 
Float:Velocity[3];
         
get_speed_vector(OriginVictimOriginJUMP_EXP 5Velocity);

         
entity_set_vectorvictimEV_VEC_velocityVelocity );
         
entity_set_vectorvictimEV_VEC_puchangleFloat:{125.0,125.0,125.0} );

         
set_task(3.0"Shake"victim)
         
g_effected[victim] = 1
         client_cmd
(victim"spk %s"grenadeeffect)
         
start_sprites[victim] = true
        
}
     } 
1 - add the library #<engine>
2 - and post the full error

Last edited by MrPickles; 11-18-2022 at 12:29.
MrPickles is offline