Raised This Month: $ Target: $400
 0% 

Distances and units:Solved:


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-04-2010 , 20:07   Re: Distances and units
Reply With Quote #2

Genious method.
Code:
#include <engine>   public Something(client) {         if (GetDistanceFromGround(client) == 2)         {                 // It's good         } }   GetDistanceFromGround(client) {         // 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(client, EV_VEC_origin, clientOrigin);         drop_to_floor(client);         entity_get_vector(client, EV_VEC_origin, groundOrigin);         entity_set_origin(client, clientOrigin);           return floatround(vector_distance(clientOrigin, groundOrigin)); }
/sarcasm
__________________

Last edited by hleV; 12-04-2010 at 20:11.
hleV 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