Raised This Month: $32 Target: $400
 8% 

Need a formula (Origin To Angles)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ayyyyyyylmao
Junior Member
Join Date: Apr 2018
Old 08-09-2018 , 10:19   Need a formula (Origin To Angles)
Reply With Quote #1

Me need a formula, convert players origin to angles, smth like
new Floatrigin = GetClientAbsOrigin(enemy);
new Float:angles = OriginToAngles(origin);
if (angles[0] == 89 && angles[1] == 0)
PrintCenterTextAll("You need look at X: 89, Y: 0 to see an enemy!");

any ideas?
ayyyyyyylmao is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 10:25   Re: Need a formula (Origin To Angles)
Reply With Quote #2

Quote:
Originally Posted by ayyyyyyylmao View Post
Me need a formula, convert players origin to angles, smth like
new Floatrigin = GetClientAbsOrigin(enemy);
new Float:angles = OriginToAngles(origin);
if (angles[0] == 89 && angles[1] == 0)
PrintCenterTextAll("You need look at X: 89, Y: 0 to see an enemy!");

any ideas?
That is an impossible task ( Almost 100% sure ), and my answer to your last post requires you to make a trace with the first argument being the client's origin and the second argument being the other player's ORIGIN AGAIN.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-09-2018 , 10:55   Re: Need a formula (Origin To Angles)
Reply With Quote #3

Quote:
Originally Posted by eyal282 View Post
That is an impossible task ( Almost 100% sure ), and my answer to your last post requires you to make a trace with the first argument being the client's origin and the second argument being the other player's ORIGIN AGAIN.
I mean there's this which can get him to where he wants:
https://sm.alliedmods.net/new-api/ve...etVectorAngles
and creating a vector from point: https://sm.alliedmods.net/new-api/ve...ctorFromPoints
Mitchell is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-09-2018 , 11:01   Re: Need a formula (Origin To Angles)
Reply With Quote #4

Quote:
Originally Posted by eyal282 View Post
That is an impossible task
and you've only been scripting for a few months
__________________
Silvers is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-09-2018 , 11:08   Re: Need a formula (Origin To Angles)
Reply With Quote #5

Quote:
Originally Posted by Silvers View Post
and you've only been scripting for a few months
Making an angle from a single origin? I would never assume this is possible. Also GetVectorAngles ( if it does work for Origin ) doesn't explicitly say "Origin" so it's a bit more confusing...

I just realized that you said I'm right lol.

Also I started Amxmodx in 2013 so I got some experience.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334

Last edited by eyal282; 08-09-2018 at 16:02.
eyal282 is offline
Facksy
Senior Member
Join Date: Apr 2017
Location: +2+2
Old 08-09-2018 , 11:22   Re: Need a formula (Origin To Angles)
Reply With Quote #6

Quote:
Originally Posted by Mitchell View Post
I mean there's this which can get him to where he wants:
https://sm.alliedmods.net/new-api/ve...etVectorAngles
and creating a vector from point: https://sm.alliedmods.net/new-api/ve...ctorFromPoints
Can you tell me whats the difference between SubstractVectors() and MakeVectorFromPoints() ?
__________________
My Steam I take private requests if related with TF2
My Plugins
Facksy is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 08-09-2018 , 11:36   Re: Need a formula (Origin To Angles)
Reply With Quote #7

Quote:
Originally Posted by Facksy View Post
Can you tell me whats the difference between SubstractVectors() and MakeVectorFromPoints() ?
There isn't one.
Fyren is offline
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 03:26.


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