Raised This Month: $ Target: $400
 0% 

How many feet in origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
travo
Senior Member
Join Date: Aug 2006
Old 11-09-2007 , 01:31   How many feet in origin
Reply With Quote #1

does anyone know how many origin points are in a foot?

example: origin (1200,100,800) and origin2 (1200,100,600)
how many actual feet are between the two origins?

thanks
travo is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-09-2007 , 01:44   Re: How many feet in origin
Reply With Quote #2

Calculate the distance..."get_distance(...)", is in units, then convert it to "meters" then to "feets" :s I will give you an e.g when i get home.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
travo
Senior Member
Join Date: Aug 2006
Old 11-09-2007 , 03:29   Re: How many feet in origin
Reply With Quote #3

k got it
new distance = get_distance(origin1,origin2);
new feet = floatround(distance/35.0);
new meter = floatround(distance/32.00);
for future reference
travo is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-09-2007 , 07:59   Re: How many feet in origin
Reply With Quote #4

I've maded a stock! Transform units(game distance) in feets.

Code:
stock Float:units_to_feets(num)
{
 new Float:Feets = (num * 0.0254) * 3.2;
 
 return Feets;
}
No. You'r formula is wrong.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-09-2007 , 08:06   Re: How many feet in origin
Reply With Quote #5

I though origin was in feet?
[ --<-@ ] Black Rose is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-09-2007 , 08:37   Re: How many feet in origin
Reply With Quote #6

Hmmm, dunno shure, maybe -.-'
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-09-2007 , 11:50   Re: How many feet in origin
Reply With Quote #7

Might as well include this data as well Alka:
Code:
public Float:Native_get_real_distance() {     new Float:vOrigin1[3], Float:vOrigin2[3]     get_array_f(1, vOrigin1, 3)     get_array_f(2, vOrigin2, 3)         new Float:hlunits = get_distance_f(vOrigin1, vOrigin2)     new Float:units = hlunits * 0.0254 // meter     new convert = get_param(3)     switch (convert)     {         case 0: units *= 39.3701    // inch         case 1: units *= 3.2808 // foot         case 2: units *= 1.0936 // yard         case 3: units *= 0.001  // kilometer         case 4: units *= 0.0006 // mile     }     return units }
Native from SHPUN which has been discontinued.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-09-2007 , 15:01   Re: How many feet in origin
Reply With Quote #8

@orangutanz - Nice thing
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-09-2007 , 17:22   Re: How many feet in origin
Reply With Quote #9

Code:
#define UnitsToMeters(%1)	(%1*0.0254)
#define UnitsToInches(%1)	(%1*1.00000054)
#define UnitsToFeet(%1)		(%1*0.08333232)
#define UnitsToYards(%1)	(%1*0.02777744)
#define UnitsToKM(%1)		(%1*0.0000254)
#define UnitsToMiles(%1)	(%1*0.00001524)
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply



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 01:13.


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