Convoy Trucking

Server related => Suggestions => Locked & Closed Suggestions => Topic started by: Strato on May 03, 2012, 10:11

Title: /d (/distance)
Post by: Strato on May 03, 2012, 10:11
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.
Title: Re: /d (/distance)
Post by: R16RACA on May 03, 2012, 10:36
meh, /loc is enough for the server atm i think
Title: Re: /d (/distance)
Post by: TheSandman on May 03, 2012, 10:40
Seems cool enough, +1
Title: Re: /d (/distance)
Post by: 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.
Title: Re: /d (/distance)
Post by: Marccc on May 03, 2012, 11:06
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.
Title: Re: /d (/distance)
Post by: $nake on May 03, 2012, 11:23
meeeeh.. /loc :) or /dst :)
Title: Re: /d (/distance)
Post by: R16RACA on May 03, 2012, 11:26
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.
Title: Re: /d (/distance)
Post by: 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
Title: Re: /d (/distance)
Post by: Bruno_2MLG4CT on May 03, 2012, 12:17
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 !
Title: Re: /d (/distance)
Post by: DrMikeee on May 03, 2012, 12:19
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
Title: Re: /d (/distance)
Post by: 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
Title: Re: /d (/distance)
Post by: Storm94 on May 03, 2012, 23:50
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.
Title: Re: /d (/distance)
Post by: 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)
Title: Re: /d (/distance)
Post by: 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.
Title: Re: /d (/distance)
Post by: 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.
Title: Re: /d (/distance)
Post by: Spekter on May 04, 2012, 09:33
This would be useful in many ways, +1.
Title: Re: /d (/distance)
Post by: Prosonic on May 04, 2012, 15:15
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.
Title: Re: /d (/distance)
Post by: 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.
Title: Re: /d (/distance)
Post by: DJ_Smashon on May 05, 2012, 14:49
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
Title: Re: /d (/distance)
Post by: Leoviz on May 05, 2012, 14:57
nahh, /locate does it better ... distances do not correspond to the roads, but from point to point on the map.

-1
Title: Re: /d (/distance)
Post by: 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?
Title: Re: /d (/distance)
Post by: Strato on May 07, 2012, 06:11
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.