24.12.2017, 19:11
(
Last edited by m1n1vv; 25/12/2017 at 04:00 PM.
)
This include designed to implement the compass in PUBG-style. It displays the current direction including the three previous directions and subsequent direstion.
All locations in a scale are multiple to the maximum step of the MAX_UICOMPASS_STEP. The direction is displayed with the interval. For example, in [41 - 47] will bring 45. Only supported with odd number of TD!
The implementation of the TD on your side.
Documentation:
RoundCompassDirection - rounds the direction to a multiple of 'round'.
CreateCompassString - creates a line with the player's direction.
CompassHeadingNorth - determines which of the TD will be displayed "N".
Video:
This is my implementation
https://youtu.be/BCsdpoDG4Xg
Defines:
GitHub:
All locations in a scale are multiple to the maximum step of the MAX_UICOMPASS_STEP. The direction is displayed with the interval. For example, in [41 - 47] will bring 45. Only supported with odd number of TD!
The implementation of the TD on your side.
Documentation:
RoundCompassDirection - rounds the direction to a multiple of 'round'.
PHP Code:
RoundCompassDirection(Float:angle, round);
//Float:angle - the current player's direction
//round - makes the number multiply to the specified value
PHP Code:
CreateCompassString(angle, round);
//angle - the player's direction, obtained from RoundCompassDirection
//round - makes the number multiply to the specified value
PHP Code:
CompassHeadingNorth(angle);
//angle - the player's direction, obtained from RoundCompassDirection
This is my implementation
https://youtu.be/BCsdpoDG4Xg
Defines:
Directives | Default | Description |
MAX_UICOMPASS_TD | 7 | The amount of TD that will be used in Your compass |
MIN_UICOMPASS_STEP | 5 | The minimum step of the compass |
MAX_UICOMPASS_STEP | 15 | The maximum step of the compass |
GitHub: