Raised This Month: $ Target: $400
 0% 

Force Push


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 04-27-2007 , 10:56   Force Push
Reply With Quote #1

I am trying to make a push that will shove everyone away from you, but what is a good way to determine which direction is "away" from someone?
this is what I was doing:
Code:
if(is_user_alive(id)) return;         new players = get_playersnum(0);     new t_origin[3], t_aim_origin[3], p_origin[3];         get_user_origin(id, p_origin);         for(new i = 0; i < players; i++) {         get_user_origin(i, t_origin);                 if(get_distance(p_origin, t_origin) <= get_cvar_num("distance_to")) {             new Float:t_velocity[3];             //here I need to get the direction to make             //them get pushed and store in t_velocity,             //then entity set vec to move them.             //how to get direction though?             entity_set_vector(i, EV_VEC_velocity, t_velocity);
__________________
DO NOT PM me about avp mod.

Last edited by Rolnaaba; 04-27-2007 at 10:58.
Rolnaaba 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 06:35.


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