SetPlayerMapIcon
From SA-MP Wiki
SetPlayerMapIcon
This function allows you to place your own icons on the map, enabling you to emphasise the locations of banks, airports or whatever else you want. A total of 63 icons are available in GTA: San Andreas, of which 62 can be used using this function. You can also specify the color of the icon, which allows you to change the white square icon (ID: 1)
(playerid, iconid, Float:x, Float:y, Float:z, markertype, color)
| playerid | The playerid parameter indicates the player who gets to see the icon. |
| iconid | The player's icon ID, range from 0 to 31 (0 to 99 in 0.3), used in RemovePlayerMapIcon. Only one icon can be at one iconid at the same time, old one gets deleted. |
| Float:x | The X-coordinate of the place where you want the icon to show up. |
| Float:y | The Y-coordinate of the place where you want the icon to show up. |
| Float:z | The Z-coordinate of the place where you want the icon to show up. |
| markertype | The icon you wish to place, scroll down for a list of available icons. |
| color | The color of the icon, this should only be used incase of the square icon (ID: 1). |
Note: If you use an invalid icon ID, it will create ID 1 (White Square)
Important note: You can only have 32 mapicons! (100 in SA-MP 0.3)
| Returns | This function returns 1 if it was successful, and 0 otherwise (e.g. the player isn't connected). |
public OnPlayerConnect( playerid ) { // This example demonstrates how to create a dollar-icon on top of a 24/7 located // in Las Venturas. This way new players know where to go with their money! SetPlayerMapIcon( playerid, 12, 2204.9468, 1986.2877, 16.7380, 52, 0 ); }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- RemovePlayerMapIcon: Remove a map icon for a player.
- SetPlayerMarkerForPlayer: Set a player's marker.
Available Map Icons
- As the intro also stated, there are 63 map icons available, one of which will crash your game if you use it.
ID
-
Name
Note
