SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 28/02/2017, 02:40 PM   #1
PeanutButter
Big Clucker
 
PeanutButter's Avatar
 
Join Date: May 2015
Location: Belgium
Posts: 103
Reputation: 41
Default CustomMarkers.inc - New types of player markers

CustomMarkers.inc

About

This include allows you to have a wide variety of marker types for players, replacing the confusing SetPlayerMarkerForPlayer() function. There are over 60 different map icons that you can use as player markers, instead of the standard little colored triangles. These Custom Markers don't interfere with the gamemode's markers, which will allow you to use markers in filterscrips without worrying about interfering with the gamemode. I couldn't find any include like this, so I made it myself. This is the first time I release an include, so let me know what could be better.
  • Easy to use, simple functions
  • More than 60 different icons
  • Replaces the standard markers
  • Doesn't interfere with gamemode markers





Functions

SetPlayerCustomMarkerForAll(playerid, type, color, worldid, interiorid, Float:streamdistance, areaid)

Code:
Info:

Sets a marker for a player that can be seen by everyone in the server.


Parameters:

- playerid
= The playerid that should get a marker on the radar

- type
= The type of marker to display, see http://wiki.sa-mp.com/wiki/MapIcons

- color (OPTIONAL: Use -1 as default)
= The color of the icon, as an integer or hex in RGBA color format, only works if type = 0

- worldid (OPTIONAL: Use -1 as default)
= The ID of the virtual world in which to marker should be displayed

- interiorid (OPTIONAL: Use -1 as default)
= The ID of the interior in which to marker should be displayed

- streamdistance (OPTIONAL)
= The max distance, as a float, at which the markers can be seen by other players

- areaid (OPTIONAL) - Does not work in V1.0 yet
= The area, from the streamer include, in which the player markers should be shown


SetPlayerCustomMarker(playerid, playerarray[], arraycount, type, color, worldid, interiorid, Float:streamdistance, areaid)

Code:
Info:

Sets a marker for a player that can be seen by everyone in playerarray[]


Parameters:

- playerid
= The playerid that should get a marker on the radar

- playerarray[]
= The array storing the players that should see the playerid's marker on the map

- arraycount
= Amount of players in the playerarray

- type
= The type of marker to display, see http://wiki.sa-mp.com/wiki/MapIcons

- color (OPTIONAL: Use -1 as default)
= The color of the icon, as an integer or hex in RGBA color format, only works if type = 0

- worldid (OPTIONAL: Use -1 as default)
= The ID of the virtual world in which to marker should be displayed

- interiorid (OPTIONAL: Use -1 as default)
= The ID of the interior in which to marker should be displayed

- streamdistance (OPTIONAL)
= The max distance, as a float, at which the markers can be seen by other players

- areaid (OPTIONAL) - Does not work in V1.0 yet
= The area, from the streamer include, in which the player markers should be shown


DestroyPlayerCustomMarker(playerid)

Code:
Info:

Deletes a player's marker


Parameters:

-playerid
= The ID of the player to delete the marker for


Installing

Requirements
Click here - You need the Steamer plugin
Click here - You need the y_timers include from the YSI library

Download
Click here - Download the CustomMarkers.inc from GitHub

Install
  • Make sure you put the steamer and y_timers in the includes
  • Put CustomMarkers.inc in your includes folder
  • Write #include <CustomMarkers> on top of your script


PS: There is a problem with the area parameter in SetPlayerCustomMarker(ForAll), I need help with that part.
__________________
MY TUTORIALS
MY INCLUDES

Last edited by PeanutButter; 15/04/2017 at 12:52 AM.
PeanutButter is offline   Reply With Quote
Old 28/02/2017, 02:55 PM   #2
Private200
High-roller
 
Private200's Avatar
 
Join Date: May 2012
Posts: 1,176
Reputation: 211
Default Re: CustomMarkers.inc - New types of player markers

Edit; just saw the video. Some great work over there, but what is up with the function?
Private200 is offline   Reply With Quote
Old 28/02/2017, 03:40 PM   #3
PeanutButter
Big Clucker
 
PeanutButter's Avatar
 
Join Date: May 2015
Location: Belgium
Posts: 103
Reputation: 41
Default Re: CustomMarkers.inc - New types of player markers

Quote:
Originally Posted by Private200 View Post
Edit; just saw the video. Some great work over there, but what is up with the function?
I can't get the areaid in the function to work correctly. It should only show the markers to the players in the given area. The problem is that when I add the areaid to the function, even the players in the area can't see the marker.
__________________
MY TUTORIALS
MY INCLUDES
PeanutButter is offline   Reply With Quote
Old 28/02/2017, 08:33 PM   #4
BlackbirdXd
Big Clucker
 
BlackbirdXd's Avatar
 
Join Date: May 2016
Location: Home
Posts: 122
Reputation: 12
Default Re: CustomMarkers.inc - New types of player markers

Amazing, that's what I need.
BlackbirdXd is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When a player types /acceptdeath they see ground? Zack9764 Help Archive 10 13/02/2011 05:58 PM
Get what a player types in a dialog? Fj0rtizFredde Help Archive 4 16/03/2010 02:51 PM
How to read what a player types regardless of what it is Torran Help Archive 0 08/02/2010 10:38 AM
How to check what a player types? Torran Help Archive 4 08/02/2010 10:31 AM
How to disble player markers like dots? For certain player[FIXED] Kyle Help Archive 1 10/08/2009 03:58 PM


All times are GMT. The time now is 09:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.