Vice City: Multiplayer

Server Development => Scripting and Server Management => Snippet Showroom => Topic started by: habi on Jul 19, 2020, 02:28 PM

Title: Snippet to face a player to another player
Post by: habi on Jul 19, 2020, 02:28 PM
Suppose you want player A to face to player B, you can use
FindPlayer(5).Angle=atan2(-(FindPlayer(0).Pos.x-FindPlayer(5).Pos.x),FindPlayer(0).Pos.y-FindPlayer(5).Pos.y)
Note: 1. Because we are measuring angle from North (y axis) instead of x axis
             2. The angle in vc-mp is measured counter-clockwise. It has been taken into account when i calculated the formula. (result in -ve sign in first parameter)
Title: Re: Snippet to face a player to another player
Post by: Sebastian on Jul 19, 2020, 02:49 PM
"Why iz everybody staring at me ?!"

or

"AIM [ON]"
Title: Re: Snippet to face a player to another player
Post by: KrOoB_ on Jul 19, 2020, 02:50 PM
very useful good job bruh :clap:
Title: Re: Snippet to face a player to another player
Post by: Mikimon on Dec 29, 2022, 05:50 AM
thats so nice, gonna build my lv 1 aimbot