What exactly is the “MarkerManager” and what does it actually do?
The MarkerManager is a management tool for all your markers. On its own, it doesn’t do anything, but you can simply register a marker via an Event that only needs to be triggered once! No more writing hundreds of lines of code just to make a marker show up in the world. You can even trigger functions with them!
Uses the Asset Escrow System (no obfuscation yet, everything is editable).
Update v1.3
Added the source code to the resource. You are free to modify it for your own version. You are not allowed to re-release it anywhere without getting permission from me.
Update v1.2
Added a new event to create more of an interaction point without an invisible marker:
TriggerEvent(“MarkerManager:RegisterNoMarker”, name, position, radius) (more in the docs)
Added a config file. You can now set if you want debug messages or not in the config.ini
Squashed 2 bugs that could cause a marker to not register and throw an error.
Update v1.1
(For people that already bought v1.0: You can access this update by simply using the same download link again that was provided to you!)
Added 2 new functions and added simple installation instructions:
event for entering a marker
event for exiting a marker
better usage instructions
Features (v1.0)
create a simple marker (just position, size and color)
create an advanced marker (all the other options from the default markers)
delete a marker
add a function to a marker
attach a marker to an entity (the white one in the screenshot is attached to the player and moves with it) using an offset
detach a marker from an entity
enable or disable a marker (useful for hiding a marker completely but not deleting it)
changing all sorts of values (like view distance, position and color)
The script itself contains all the proper documentation on how to use it and an example (if you have enabled the example in the fxmanifest, go to the spot in the screenshot, you can see it there)
The docs / example can also be accessed here, if you want a sneak peek on how it all works.
Inner workings
Most scripts just have a loop constantly running for their own markers (e.g. every single job script), checking distances between the player and the markers position. This takes a lot of performance, but it needs to be done for basically any script involving markers.
This is a C# script and it just processes all those markers in 3 loops (one for drawing, one for checking if the player is inside the marker, and one if it is in view distance). No matter how many markers you have, performance should not be a concern anymore! With around 250 markers on the screen at the SAME time (256 is the maximum number of markers, that can be visible at the same time in the engine), it only takes around 0.20ms and if there are only a few to be seen (like it would normally be the case), the script chills at around 0.09ms (kind of the default for a C# resource; lua takes around 0.60ms for 250+ markers (with only a few on screen)). I even tested 700 markers across the map with only a few visible and the script takes only ~0.11ms.
Can you show a example of how the data is saved? Over JSON? Or is there a config?
Is there a GUI of some sort to make the markers? A video would also help.
Great idea for Framework makers. But not for average person who has 100s of table data for garages, shops etc already setup. But still it would be very helpful if its easy then writing DrawMarker in a loop.
I don’t think a video would help here, but yea, I think I should upload the docs / example as a separate thing, so people can look into it before buying.
I don’t save any data at all ( you’ll see in the example how it works)
I took a look at meta_libs, and yes, regarding the markers it is similar (well, in terms of lua vs. C#)
My script also provides you with the ability to trigger events from within a marker. That might be something people look for as well (at least I didn’t find something similar in meta_libs)
We got a new update in! Now the script has 2 new events that can be triggered by entering / exiting a marker. I also added some simple instructions to clear it up for some people
Not trying to start an argument, but it’s a little rude to bring up the free thing in reference to a script that only costs 3 Euros. The scripts on his site are much cheaper than I’ve seen elsewhere, and he deserves a little money for the time spent.
I personally come from a point of “Modding should be free”. Right now the only reason for me to make them paid is that I actually need the money.
Either make a few cheap (compared to most as you said ) scripts or get another job and not have time to make any scripts for most to enjoy.
But I like the criticism and suggestions. If a free (or cheaper) script has more features than mine, then that is a reason to expand on it. For no additional costs.
It would be really awesome if you could add a GUI to to. Like a menu system where you can just walk around and place a marker if you need. It would simplify things a lot when you just want a simple visual indicator somewhere.