Radius question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Radius question (
/showthread.php?tid=626211)
Radius question -
AndreiWow - 12.01.2017
Hello guys, I'd like to know how much is like 1 radius in game? I want to make a /gate command that will work on radius but there are more gates next to each other and I want to know exactly the radius I should work so it will open the right gate
Re: Radius question -
SickAttack - 12.01.2017
1 meter
Re: Radius question -
saffierr - 12.01.2017
1 is extremely short.
The way I always test it, is with /dl In-Game.
Re: Radius question -
Lordzy - 12.01.2017
Quote:
Originally Posted by AndreiWow
Hello guys, I'd like to know how much is like 1 radius in game? I want to make a /gate command that will work on radius but there are more gates next to each other and I want to know exactly the radius I should work so it will open the right gate
|
I'd rather consider which gate the player is looking at to be opened or compare their angles if multiple gates are VERY close within a radius.
Re: Radius question -
SickAttack - 12.01.2017
Quote:
Originally Posted by Lordzy
I'd rather consider which gate the player is looking at to be opened or compare their angles if multiple gates are VERY close within a radius.
|
I'd rather consider using areas with streamer (more efficient for certain scenarios [e.g. showing a TextDraw when close, hiding it when far], more accurate than IsPlayerInRangeOfPoints).
Re: Radius question -
Lordzy - 12.01.2017
Quote:
Originally Posted by SickAttack
I'd rather consider using areas with streamer (more efficient for certain scenarios [e.g. showing a TextDraw when close, hiding it when far], more accurate than IsPlayerInRangeOfPoints).
|
I can agree on using areas with Streamer plugin than IsPlayerInRangeOfPoints. What I said was slightly different though. A player could be in gate's area even if it's not being looked at. The gate system I once developed were meant to be opened depending on player's camera looking at them, which I felt quite interesting myself. Other than that, the best option is to have areas using Streamer.
Re: Radius question -
SickAttack - 12.01.2017
Quote:
Originally Posted by Lordzy
I can agree on using areas with Streamer plugin than IsPlayerInRangeOfPoints. What I said was slightly different though. A player could be in gate's area even if it's not being looked at. The gate system I once developed were meant to be opened depending on player's camera looking at them, which I felt quite interesting myself. Other than that, the best option is to have areas using Streamer.
|
If he wants that functionality (opens if you're looking at the gate), then even better to use areas as that can allow a timer to run only when the player is in the area (as a timer is obviously required for that).
Re: Radius question -
Lordzy - 12.01.2017
Quote:
Originally Posted by SickAttack
If he wants that functionality (opens if you're looking at the gate), then even better to use areas as that can allow a timer to run only when the player is in the area (as a timer is obviously required for that).
|
I think I haven't been clear in my last post, by detecting camera, I didn't totally mean that Streamer areas shouldn't be concerned. I'd not recommend IsPlayerInRangeOfPoint, unless it's to be used for certain commands or temporary situations.
Re: Radius question -
AndreiWow - 12.01.2017
And how can I create an area? Sorry but I never worked with streamer
Re: Radius question -
Lordzy - 12.01.2017
https://github.com/samp-incognito/sa...Natives-(Areas)