Raised This Month: $ Target: $400
 0% 

Distances and units:Solved:


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 12-05-2010 , 00:49   Re: Distances and units
Reply With Quote #5

Quote:
Originally Posted by BigMac View Post
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!
The odds of you being able to use that command when you're exactly 2 units from the ground are slim. Try checking a range rather than an exact unit amount.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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