SetPlayerMapIcon

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:11, 23 January 2014
Costel nistor96 (Talk | contribs)

← Previous diff
Revision as of 18:22, 4 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 1: Line 1:
{{Scripting}} {{Scripting}}
-{{Title}} 
{{Description|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, all of which can be used using this function. You can also specify the color of the icon, which allows you to change the square icon (ID: 0)}} {{Description|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, all of which can be used using this function. You can also specify the color of the icon, which allows you to change the square icon (ID: 0)}}
Line 35: Line 34:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
-[[zh:SetPlayerMapIcon函数]]+[[fr:SetPlayerMapIcon函数]]
 +[[zh:SetPlayerMapIcon]]

Revision as of 18:22, 4 February 2014



Description:

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, all of which can be used using this function. You can also specify the color of the icon, which allows you to change the square icon (ID: 0)


Parameters:
(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style)
playeridThe ID of the player to set the map icon for.
iconidThe player's icon ID, ranging from 0 to 99, to be used in RemovePlayerMapIcon.
Float:xThe X coordinate of the place where you want the icon to be.
Float:yThe Y coordinate of the place where you want the icon to be.
Float:zThe Z coordinate of the place where you want the icon to be.
markertypeThe icon to set.
colorThe color of the icon, this should only be used with the square icon (ID: 0).
styleThe style of icon.


Return Values:

This function returns 1 if it was successful, and 0 otherwise (e.g. the player isn't connected).


Image:32px-Ambox_warning_orange.png

Note

If you use an invalid icon ID, it will create ID 1 (White Square)
Image:32px-Circle-style-warning.png

Important
Note

You can only have 100 mapicons!


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, MAPICON_LOCAL );
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages