SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 24/12/2017, 08:11 PM   #1
m1n1vv
Big Clucker
 
m1n1vv's Avatar
 
Join Date: May 2013
Posts: 62
Reputation: 37
Default UICompass


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 

Video:

This is my implementation


https://youtu.be/BCsdpoDG4Xg


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:
__________________
[Include] UICompass
[Tutorial] Object collision in 3ds Max

Last edited by m1n1vv; 25/12/2017 at 05:00 PM.
m1n1vv is online now   Reply With Quote
Old 25/12/2017, 09:04 AM   #2
rfr
Banned
 
Join Date: Nov 2017
Posts: 278
Reputation: 43
Default Re: UICompass

wow good
rfr is offline   Reply With Quote
Old 25/12/2017, 09:18 AM   #3
NealPeteros
Gangsta
 
NealPeteros's Avatar
 
Join Date: Dec 2015
Location: GetPlayerCountry(playerid);
Posts: 638
Reputation: 51
Default Re: UICompass

That looks a lot like PUBG's doesn't it? I'm guessing this was inspired by the game?

EDIT:
Quote:
This include designed to implement the compass in PUBG-style. It displays the current direction including the three previous directions and subsequent direstion.
Didn't see this, my apologies.

Nice one, btw. Advanced.



EDIT2: Would recommend this to TDM scripts such as CoD. Can be for Roleplay, but wouldn't be fit for me.
__________________
Quote:
SA-MP is like a drug or alcohol or smoking.. you really get used to it and can not leave it.
NealPeteros is offline   Reply With Quote
Old 25/12/2017, 09:23 AM   #4
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,174
Reputation: 353
Default Re: UICompass

Unique, love how the forum getting these extraordinary releases nowadays, good job +rep.
__________________

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is online now   Reply With Quote
Old 25/12/2017, 10:51 AM   #5
m1n1vv
Big Clucker
 
m1n1vv's Avatar
 
Join Date: May 2013
Posts: 62
Reputation: 37
Default Re: UICompass

Quote:
Originally Posted by NealPeteros View Post
Didn't see this, my apologies.
I'm working on it. That's the sketch.
Quote:
The implementation of the TD on your side.
__________________
[Include] UICompass
[Tutorial] Object collision in 3ds Max
m1n1vv is online now   Reply With Quote
Old 25/12/2017, 05:01 PM   #6
m1n1vv
Big Clucker
 
m1n1vv's Avatar
 
Join Date: May 2013
Posts: 62
Reputation: 37
Default Re: UICompass

This is my implementation


https://youtu.be/BCsdpoDG4Xg
__________________
[Include] UICompass
[Tutorial] Object collision in 3ds Max
m1n1vv is online now   Reply With Quote
Old 25/12/2017, 05:25 PM   #7
Barnwell
Banned
 
Join Date: May 2014
Location: England
Posts: 597
Reputation: 40
Default Re: UICompass

Great job
Barnwell is offline   Reply With Quote
Old 26/12/2017, 10:46 AM   #8
StrikerZ
High-roller
 
StrikerZ's Avatar
 
Join Date: Mar 2016
Location: India
Posts: 1,104
Reputation: 154
Default Re: UICompass

And a similar one's in Assassin's creed origins
good job!
__________________
StrikerZ is offline   Reply With Quote
Old 26/12/2017, 12:37 PM   #9
cuber
Gangsta
 
cuber's Avatar
 
Join Date: Oct 2016
Location: KS.
Posts: 837
Reputation: 148
Default Re: UICompass

Damn, well done!
cuber is online now   Reply With Quote
Old 05/01/2018, 03:47 PM   #10
Lovejoy
Big Clucker
 
Join Date: Jan 2018
Location: 127.0.0.1
Posts: 142
Reputation: 19
Default Re: UICompass

Someone can create a Filterscript with this compass 100% functional? i'm having a lot of difficulties to do it
Lovejoy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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



All times are GMT. The time now is 05:31 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.