Jump to content
ZaellixA

How to get markers on a unit's map?

Recommended Posts

Hey everyone.

 

I am facing a problem. I am looking for a way to get all the markers a player has created on their map. All I have found so far is allMapMarkers but I am not sure how exactly to find out which marker was created by whom.

 

Any ideas or insights are most welcome.

Share this post


Link to post
Share on other sites
10 minutes ago, ZaellixA said:

Hey everyone.

 

I am facing a problem. I am looking for a way to get all the markers a player has created on their map. All I have found so far is allMapMarkers but I am not sure how exactly to find out which marker was created by whom.

 

Any ideas or insights are most welcome.

All info needed is to be found on the allMapMarkers wiki.

Simply filter the strings of allMapMarkers to match the player ID generated from onPlayerConnected.

 

Cheers

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for the answer Grumpy Old Man. I kinda had a look into that. The thing that discouraged me was that, in the way I see it, I will have to somehow find out what each player's ID is and keep track of that.

 

I would really like to avoid that, or at least find a way to do it inside a "quite compact" script.

 

So the whole thing boils down to finding out the correct player ID right?

Share this post


Link to post
Share on other sites
7 hours ago, ZaellixA said:

Thanks for the answer Grumpy Old Man. I kinda had a look into that. The thing that discouraged me was that, in the way I see it, I will have to somehow find out what each player's ID is and keep track of that.

 

I would really like to avoid that, or at least find a way to do it inside a "quite compact" script.

 

So the whole thing boils down to finding out the correct player ID right?

Well you can set up a simple associative array using the UID of the player which is also passed to the onPlayerConnected command.

Already quite compact if you ask me, can be run on server only.

 

Cheers

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for the help mate. I was kind thinking the same (much like creating a map), but I was hoping for a all-in-one script solution.

 

Nevertheless, I really appreciate the help.

 

Cheers.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×