Raised This Month: $ Target: $400
 0% 

Distances and units:Solved:


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BigMac
Member
Join Date: Jul 2009
Old 12-04-2010 , 20:55   Re: Distances and units
Reply With Quote #4

PHP Code:
public Something(id)
{
 if (
GetDistanceFromGround(id) == 2)
 {
  
client_print(0print_chat"testing");
 }
}
 
GetDistanceFromGround(id)
{
        
// Check if player is on ground?
        // if (entity_get_int(client, EV_INT_flags) & FL_ONGROUND)
        //         return 0;
 
 
new Float:clientOrigin[3], Float:groundOrigin[3];
 
 
entity_get_vector(idEV_VEC_originclientOrigin);
 
//drop_to_floor(id);
 
entity_get_vector(idEV_VEC_origingroundOrigin);
 
entity_set_origin(idclientOrigin);
 
 return 
floatround(vector_distance(clientOrigingroundOrigin));

Why doesn't this work then?
I jump up and didn't get that message and when i jump down or fell down i still didn't get that message!
__________________
BigMac 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 11:22.


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