Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Include] UICompass

$
0
0

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'.
PHP Code:

RoundCompassDirection(Float:angleround);

//Float:angle - the current player's direction
//round - makes the number multiply to the specified value 

CreateCompassString - creates a line with the player's direction.
PHP Code:

CreateCompassString(angleround);

//angle - the player's direction, obtained from RoundCompassDirection
//round - makes the number multiply to the specified value 

CompassHeadingNorth - determines which of the TD will be displayed "N".
PHP Code:

CompassHeadingNorth(angle);

//angle - the player's direction, obtained from RoundCompassDirection 


Defines:

DirectivesDefaultDescription
MAX_UICOMPASS_TD7The amount of TD that will be used in Your compass
MIN_UICOMPASS_STEP5The minimum step of the compass
MAX_UICOMPASS_STEP15The maximum step of the compass


GitHub:

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>