View Single Post
Author Message
KiLLeR.
Senior Member
Join Date: Jul 2014
Location: Bulgaria
Old 03-19-2016 , 16:50   Reverse velocity of player
Reply With Quote #1

PHP Code:
public function(id)
    new 
Float:velocity[3];
    
entity_get_vector(idEV_VEC_velocityvelocity);
    
    
velocity[0] = -velocity[0] * 2.0
    velocity
[1] = -velocity[1] * 2.0
    velocity
[2] = -velocity[2] * 2.0
    
    entity_set_vector
(idEV_VEC_velocityvelocity); 
When the player stay motionless his velocity is 0.0, how can i push him backward. My goal is when the function is called to push away all players in the range.

Last edited by KiLLeR.; 03-19-2016 at 17:02.
KiLLeR. is offline