/d (/distance)

Started by Fender, May 03, 2012, 10:11

Strato

Hi, a little suggestion from me.


I think it would be good to add a command as /d which's /distance. How will it work? For example /d Strato. , and a message will show:
Strato is 10,2 KM away from You.


It will show the distance between You and a player that You are locating. It would be useful in many ways, being as cop, convoy's and way more.


Hope You like it.

R16RACA

meh, /loc is enough for the server atm i think
[hide=when smokey tried to eat me]
Quote[15:00:41] <Rahail> R16 smoky wants you!
[15:00:58] <R16RACA> ahhh!
[15:01:15] <Rahail> the fuck 530kph on FREway
[/hide]
[hide=Konali summing me up]
Quote from: KonaliR16 u where maybe a quiet guy, but you are one of the smartest persons i have seen here and i never saw u gettin in trouble. U are a role model for alot players that cant behave and i will really really miss you.
[/hide]
[hide=quotes from Mick]
Quote from: Mick88*Mick88 announced: Fuuuuuu!
Quote from: Mick88"fuck off" is merely a kind request
Quote from: mick88
New theme is so sexy I want to make love to it
[/hide]
[hide=why ELM is not allowed here]It is not allowed as it is a mod that can be seen by other truckers, who might not want to look at flashing lights all the time. This is why only non laggy mods that only you can see are allowed.[/hide]

TheSandman

Seems cool enough, +1
25/8/11 - 4/10/15: 1502 days of continuous staff duty C:-)

Strato

Quote from: R16RACA on May 03, 2012, 10:36
meh, /loc is enough for the server atm i think


Yeah but sometimes it doesn't show right.. for example 'unkown location', 'Las Venturas', are You wise enough to know in which place he is there? Therefore /d would be a nice thing to show how far away he is.

Marccc

If you play enough here you should know the names of all the area's so when /loc you have to know where he is. Also after /loc the player marker flash and if you dont see that just /join the person.

LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN
BURGLARIES
ARMORED VANS STOLEN
MISSIONS FAILED
OVERLOADED
FINES PAID
TOTAL SPENT ON FUEL
INTEREST EARNED
DISTANCE TRAVELLED
TIME IN JAIL
LAST MISSION
Generated by ASP.NET Core on Linux using the Convoy Trucking API. Updates every 5 minutes. See the original SVG image.

~!!!~ Watch my Police cars collection in the link below ~!!!~

[hide=link]http://imgur.com/a/gaJTT[/hide]

$nake

meeeeh.. /loc :) or /dst :)

R16RACA

Quote from: Strato. on May 03, 2012, 10:53
Quote from: R16RACA on May 03, 2012, 10:36
meh, /loc is enough for the server atm i think


Yeah but sometimes it doesn't show right.. for example 'unkown location', 'Las Venturas', are You wise enough to know in which place he is there? Therefore /d would be a nice thing to show how far away he is.


yea, i do actually know where those place are lol...


and if i didnt
Quote from: Marccc on May 03, 2012, 11:06
Also after /loc the player marker flash and if you dont see that just /join the person.
[hide=when smokey tried to eat me]
Quote[15:00:41] <Rahail> R16 smoky wants you!
[15:00:58] <R16RACA> ahhh!
[15:01:15] <Rahail> the fuck 530kph on FREway
[/hide]
[hide=Konali summing me up]
Quote from: KonaliR16 u where maybe a quiet guy, but you are one of the smartest persons i have seen here and i never saw u gettin in trouble. U are a role model for alot players that cant behave and i will really really miss you.
[/hide]
[hide=quotes from Mick]
Quote from: Mick88*Mick88 announced: Fuuuuuu!
Quote from: Mick88"fuck off" is merely a kind request
Quote from: mick88
New theme is so sexy I want to make love to it
[/hide]
[hide=why ELM is not allowed here]It is not allowed as it is a mod that can be seen by other truckers, who might not want to look at flashing lights all the time. This is why only non laggy mods that only you can see are allowed.[/hide]

Hobo

I can do /loc Strato and find out that he's in Dillimore, Red County.
Or I could do /d Strato and find out he's 500m away. In what direction? I just know the distance but I still don't know where. -1 from me


[tr]
[td]

[/td]
[td][/td]
[td]

[shadow=black,left]My PC Specs:
-AMD Ryzen 7 2700X
-EVGA RTX 3080
-ASUS Prime X470-Pro Motherboard
-CORSAIR Vengeance RGB PRO 32GB RAM
-ADATA SX8200 NVME SSD 960GB
-Seagate IronWolf Pro 8TB HDD
-Western Digital Blue 2TB HDD
-ADATA Ultimate SU800 2TB SDD x2
-ADATA Ultimate SU800 1TB SSD x2
-Corsair HX750 Professional PSU
-NZXT H440 white/black case
[/shadow]
[/td]
[/tr]
[/table]

Bruno_2MLG4CT

Quote from: The_Hobo on May 03, 2012, 11:42
I can do /loc Strato and find out that he's in Dillimore, Red County.
Or I could do /d Strato and find out he's 500m away. In what direction? I just know the distance but I still don't know where. -1 from me
Yes i agree with this !





Credits to our slave Sorin

Quote from: Konali
turtle, you as much an asslicker than everyone else, everytime you get reported, you message me on xfire or facebook

Quote from: Taylor Swift#DemotSurpm

DrMikeee

I like your suggestion :p
But after reading other peoples reply I came up with a little idea. Maybe just add the /d function to the /loc command.
Example:
/loc Strato.
Strato. is in Dillimore, Red Country - 49,3 km from you

It would also be nice in convoys to see how far your convoy mates are from you.
Fully support from me, but maybe add it to the already existing command /loc :p

Joshy

I can see this being abused to tell if staff are spectating. So that needs to be avoided, and hopefully fixed in /loc too.

I think it should be merged with /loc, like this:
[12:34:56] Joshy is heading North in Whitewood Estates, Las Venturas, 3.14km away from you.

Remember to allow MPH users to use miles instead.

Anyway, to script it's fairly easy, just use Pythagoras theorem to calculate the hypotenuse of a triangle. Mick already knows how to do this (either using this or some other method) as it's up and running in /dst.

However I must point out that it will be point-to-point distance, and not road route distance. Like /dst.

+1
[comment]test[/comment]
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN
BURGLARIES
ARMORED VANS STOLEN
MISSIONS FAILED
OVERLOADED
FINES PAID
TOTAL SPENT ON FUEL
INTEREST EARNED
DISTANCE TRAVELLED
TIME IN JAIL
LAST MISSION
Generated using Azure Functions & CloudFlare Workers using the Convoy Trucking API. Updates every around 5 minutes. See the original SVG image. View source code (not updated with function yet)




Storm94

Quote from: Joshy on May 03, 2012, 16:05
I can see this being abused to tell if staff are spectating. So that needs to be avoided, and hopefully fixed in /loc too.

I think it should be merged with /loc, like this:
[12:34:56] Joshy is heading North in Whitewood Estates, Las Venturas, 3.14km away from you.

Remember to allow MPH users to use miles instead.

Anyway, to script it's fairly easy, just use Pythagoras theorem to calculate the hypotenuse of a triangle. Mick already knows how to do this (either using this or some other method) as it's up and running in /dst.

However I must point out that it will be point-to-point distance, and not road route distance. Like /dst.

+1
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.

I'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.

Joshy

Quote from: Storm94 on May 03, 2012, 23:50
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.
One does not simply look cool without using Pythgoras. 8)
[comment]test[/comment]
LAST SEEN
TOTAL TIME ON SERVER
SCORE
TRUCK LOADS
CONVOY SCORE
ACHIEVEMENTS
ARTIC
DUMPER
VAN
FUEL
CEMENT
ARRESTS
CARS STOLEN
COACH
PLANE
HELICOPTER
TOW TRUCK
LIMO
TRASH
ARMORED VAN
BURGLARIES
ARMORED VANS STOLEN
MISSIONS FAILED
OVERLOADED
FINES PAID
TOTAL SPENT ON FUEL
INTEREST EARNED
DISTANCE TRAVELLED
TIME IN JAIL
LAST MISSION
Generated using Azure Functions & CloudFlare Workers using the Convoy Trucking API. Updates every around 5 minutes. See the original SVG image. View source code (not updated with function yet)




Deff

Quote from: Joshy on May 04, 2012, 00:40
Quote from: Storm94 on May 03, 2012, 23:50
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.
One does not simply look cool without using Pythgoras. 8)

I think this would be faster (in terms of miniseconds or micro lol), since the calculation will be directly done without calling any external functions.

I dont know much about samp scripting though.

Storm94

Quote from: Deff on May 04, 2012, 01:31
Quote from: Joshy on May 04, 2012, 00:40
Quote from: Storm94 on May 03, 2012, 23:50
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.
One does not simply look cool without using Pythgoras. 8)

I think this would be faster (in terms of miniseconds or micro lol), since the calculation will be directly done without calling any external functions.

I dont know much about samp scripting though.
Calling a SAMP function is near instantaneous. Doing all that math would take time.

I'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.

Spekter

This would be useful in many ways, +1.




Prosonic

Quote from: Joshy on May 03, 2012, 16:05
I can see this being abused to tell if staff are spectating. So that needs to be avoided, and hopefully fixed in /loc too.

I think it should be merged with /loc, like this:
[12:34:56] Joshy is heading North in Whitewood Estates, Las Venturas, 3.14km away from you.

Remember to allow MPH users to use miles instead.

Anyway, to script it's fairly easy, just use Pythagoras theorem to calculate the hypotenuse of a triangle. Mick already knows how to do this (either using this or some other method) as it's up and running in /dst.

However I must point out that it will be point-to-point distance, and not road route distance. Like /dst.

+1

/ What Cocasquash said.

"No you where not ban evading.. nooo and im stupid..." - Konali

Deff

Quote from: Storm94 on May 04, 2012, 05:49
Quote from: Deff on May 04, 2012, 01:31
Quote from: Joshy on May 04, 2012, 00:40
Quote from: Storm94 on May 03, 2012, 23:50
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.
One does not simply look cool without using Pythgoras. 8)

I think this would be faster (in terms of miniseconds or micro lol), since the calculation will be directly done without calling any external functions.

I dont know much about samp scripting though.
Calling a SAMP function is near instantaneous. Doing all that math would take time.

That would be faster (using that function) in overall script if the distance equation needs to be used multiple times, if its just the case for one time, then direct calculation is faster, because in that predefined function its obvious there would be calculation (most probably the same theorem as stated above) which can be viewed in the respect include.

DJ_Smashon

Quote from: Joshy on May 03, 2012, 16:05
I can see this being abused to tell if staff are spectating. So that needs to be avoided, and hopefully fixed in /loc too.

I think it should be merged with /loc, like this:
[12:34:56] Joshy is heading North in Whitewood Estates, Las Venturas, 3.14km away from you.

Remember to allow MPH users to use miles instead.

Anyway, to script it's fairly easy, just use Pythagoras theorem to calculate the hypotenuse of a triangle. Mick already knows how to do this (either using this or some other method) as it's up and running in /dst.

However I must point out that it will be point-to-point distance, and not road route distance. Like /dst.

+1


+1
A.K.A NaftaTorque
Old ID=9149

Leoviz

nahh, /locate does it better ... distances do not correspond to the roads, but from point to point on the map.

-1

Storm94

Quote from: Deff on May 04, 2012, 23:11
Quote from: Storm94 on May 04, 2012, 05:49
Quote from: Deff on May 04, 2012, 01:31
Quote from: Joshy on May 04, 2012, 00:40
Quote from: Storm94 on May 03, 2012, 23:50
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.
One does not simply look cool without using Pythgoras. 8)

I think this would be faster (in terms of miniseconds or micro lol), since the calculation will be directly done without calling any external functions.

I dont know much about samp scripting though.
Calling a SAMP function is near instantaneous. Doing all that math would take time.

That would be faster (using that function) in overall script if the distance equation needs to be used multiple times, if its just the case for one time, then direct calculation is faster, because in that predefined function its obvious there would be calculation (most probably the same theorem as stated above) which can be viewed in the respect include.

Hardly the most effecient way when it comes to scripting though. That function is built into the a_samp include for a reason. Why reinvent the wheel, when the function already exists?

I'm back, bitches :D

[glow=#282828,10,500]"I dislike Apple, so no." -mick88
"$nake honestly you are one arrogant prick." -Shane0
"The rest of you who I could consider trolls, just go fuck yourself." -Joshy
"TheGame, All I have to say is you complain a lot, and you're probally gonna be an even more arrogant, pompous jackass after this." -RaceRX
"I have a suggestion: Repost this in a respectful manner without caps, silly colors and big fonts, and perhaps someone will give a fuck about your complaint." -mick88
[/glow]

Can't read my quotes? Stop using the white style.

Strato

Quote from: Storm94 on May 07, 2012, 04:34
Quote from: Deff on May 04, 2012, 23:11
Quote from: Storm94 on May 04, 2012, 05:49
Quote from: Deff on May 04, 2012, 01:31
Quote from: Joshy on May 04, 2012, 00:40
Quote from: Storm94 on May 03, 2012, 23:50
Or, you know, GetPlayerDistanceFromPoint() where the point is the other players position. It doesnt take complicated scripting, SAMP has the function built in.
One does not simply look cool without using Pythgoras. 8)

I think this would be faster (in terms of miniseconds or micro lol), since the calculation will be directly done without calling any external functions.

I dont know much about samp scripting though.
Calling a SAMP function is near instantaneous. Doing all that math would take time.

That would be faster (using that function) in overall script if the distance equation needs to be used multiple times, if its just the case for one time, then direct calculation is faster, because in that predefined function its obvious there would be calculation (most probably the same theorem as stated above) which can be viewed in the respect include.

Hardly the most effecient way when it comes to scripting though. That function is built into the a_samp include for a reason. Why reinvent the wheel, when the function already exists?


I have this script created by myself + my friend on my computer. I may look for it if mick wants help.