![]() |
[Filterscript] Map Markers new - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Releases (https://forum.open.mp/forumdisplay.php?fid=13) ---- Forum: Filterscripts (https://forum.open.mp/forumdisplay.php?fid=30) ---- Thread: [Filterscript] Map Markers new (/showthread.php?tid=3075) |
Map Markers new - swuffted - 2025-02-13 I originally posted my thread to wrong section and i don't know how to delete it but i will also paste it here! π― [RELEASE] Per-Player Colored Checkpoints, Arrows & Decal Hoops πΉ Introduction Hey everyone! π I'm Dzherekarov (or Jerry), and Iβd like to share my filterscript with you. It can be turned into an include or even a plugin, but unfortunately, I'm both busy and lazy, so I wonβt be doing that. π However, you are free to modify it as you wish! I've always been annoyed with SA-MPβs built-in checkpoints, race checkpoints, enex arrows, and pickups, so I created a solution: β Per-player colored checkpoints β Custom arrows & rotating decal hoops β 237 unique map marker IDs (0β237) β Markers rotate and glow like real checkpoints β No timers or TickCount used! π’ Note: My native language is Bulgarian, so donβt judge me too harshly. Also, Iβm not a professional scripter, just a guy with patience! π Requirements To run this filterscript, you need: πΉ #include <YSF> πΉ #include <streamer> Itβs my first time writing a thread, so donβt expect perfection! π π Features & Usage One of the best parts of this system is that you donβt need to manually track marker IDs. Everything is handled automatically. β Adding a Map Marker AddMapMarker(playerid, type = 0, Float:X, Float:Y, Float:Z, col = 0xAAAAAAAA, colh = 0xAADD1111, vw = 0, interior = 0, Float:DrawDist = 110.0, dtext[]="MARKER TAG", col3d = 0x00000000, testl = 1, Float:tdrawdist = 50.0); π Markers are automatically indexed when created. No need to manually declare them! π You can add markers in OnPlayerSpawn or OnPlayerConnect, and they will persist. π Destroying a Marker DestroyMarker(playerid, markerid); π If you have 30 map markers, ID 1 is actually 0 (so valid IDs are 0β29). π When you destroy ID 5, it becomes available again for the next marker you create. π₯ Destroy All Markers DestroyAllMarkers(playerid); π Removes all markers for a player. π Get a Marker ID GetMarkerID(playerid, markerid); π Retrieves the valid ID of a marker. π Filterscript Restart Behavior Markers are automatically destroyed when the filterscript restarts. If you create them OnPlayerSpawn, the player must respawn after a restart to see them again. π Important Notes π These markers are per-player, so they do not use GlobalObject slots. π You can place 50 markers around a player, but they are only visual effects. π If you want interactions (e.g., triggers when entering a marker), use: Pickups Streamer Areas Timers π¬ Final Thoughts This system is great for shops, player missions, and custom checkpoint systems. Feel free to test, modify, and improve it! Let me know if you have feedback or suggestions. Enjoy! π some pics: ![]() ![]() ![]() ![]() ![]() ![]() ![]() you can use any color you want for your hoops checkpoints and decals only enex are limited to yellow red green and blue! you can also set the hoop a green color and the decal to a blue color if u wish! note : there are more options that can be included for example any samp object that is non-collidable will rotate and glow! you can make new pickups for the weapons as they areΒ non collidable so you can have red m4 or ak-47 like a pickup. to achive nonrotating 'glowing' effect like light or a highlighted texture or materialtext use objectΒ 3534 attaching your main object to it will make it glow!Β essentialy attaching any object to an object with animation will make the attached object glow! source code : https://pastebin.com/ZY0EMp1k RE: Map Markers new - imaim3024 - 2025-04-01 yo, your pastebin can not be opened RE: Map Markers new - KingOfSA-MP - 2025-04-03 fix ur pastebin RE: Map Markers new - swuffted - 2025-05-10 hey the pastebin is fixed -Β https://pastebin.com/ZY0EMp1k however there is some bugs as is the original version 0.1 its better to make some workaround the markers id like new marker1 = AddMapMarker.... and later delete the marker1.. etc.. there is a camera bug of some sorts for example the markers rotate 360 like a real cp,markers but for some reason when you get to close to it and play with the camera around the marker they freeze when you play with the camera more they unfreeze now that is samp bug... once more if you want you can add more types of markers when you check the code and understand it i think you are not able the addmapmarker with a type id like numbers rather must use the enum name as i updated the defines i think! -Theo have fun! |