open.mp forum
[Pawn] Map icon does not change color - Printable Version

+- open.mp forum (https://forum.open.mp)
+-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
+--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
+--- Thread: [Pawn] Map icon does not change color (/showthread.php?tid=1821)



Map icon does not change color - Jhames - 2021-03-30

Hello guys, I have a little problem.



I am trying to change the color of an icon on the map but it is not working, I am trying to make the icon black, but it does not work.




Is the color correct? I'm using like this:?0x000000FF



Code:
public OnPlayerConnect(playerid) { ? ? SetPlayerMapIcon(playerid, 1, 2756.7896,-2431.2869,13.4790, 2, 0x000000FF, MAPICON_GLOBAL); ? ? return 1; }



RE: Map icon does not change color - DandoRYx - 2021-03-30

The 2 before the color, is the markertype.

https://open.mp/docs/scripting/resources/mapicons



I don't think you can color that one, I think you're able to color only ID 0 (Colored Square/Triangle (Dynamic)).

And also there's:
Quote:Marker type 1 (), 2 (), 4 (), and 56 () will cause your game to crash if you have map legends enabled while viewing the map.