Server lag when disabling the map, inconsistent
currently using the map block plugin and the concept is great, however because there is a lag between when the map is called (on death or using pressing G) and when this plugin activates (client calling the server and the plugin responds) the map can be seen for a short while post death, and if you spam the G button you can see the map.

The plugin does not also activate for all players all the time, I can press G and see the map one day, and the next time I connect the plugin will block the map (within the context I set out above).
The server does not send anything when the player opens the map, even more, the server basically does not know when the player opened the map.
All display takes place only on the client.

Why is this happening?

It's simple, when you open a map, MapInterface.SetOpen -> MapInterface.ForceOpen -> MapInterface.MarkersDirty is called. MarkersDirty, in turn, launches Invoke UpdateMarkers. And inside UpdateMarkers, SetupMonuments is displayed first, and then SetupMarkers.

Which is quite logical, you will not create the driver's seat first, and then the car.



P.S. The code is most likely already different, since these are the client sources from version 2183 (August 2019). But the logic for displaying objects remains the same.