20.04.2011, 22:51
Parameters:
(playerid, iconid, Float: x, Float: y, Float: z, markertype, color, style)
playerid The ID of the player to set the map icon for.
iconid The player's icon ID, ranging from 0 to 99, to be used in RemovePlayerMapIcon.
Float: x The X coordinate of the place where you want the icon to be.
Float: y The Y coordinate of the place where you want the icon to be.
Float: z The Z coordinate of the place where you want the icon to be.
markertype The icon to set.
color The color of the icon, this should only be used with the square icon (ID: 1).
style See Below
Style
0: MAPICON_LOCAL Display in the player's local area
1: MAPICON_GLOBAL Display always
2: MAPICON_LOCAL_CHECKPOINT Display in the player's local area and has a checkpoint marker
3: MAPICON_GLOBAL_CHECKPOINT Display always and has a checkpoint marker
Note: If you use an invalid icon ID, it will create ID 1 (White Square)
Important Note: You can only have 100 mapicons!
Returns This function returns 1 if it was successful, and 0 otherwise (e.g. the player isn't connected).
Tutorial from wiki.
(playerid, iconid, Float: x, Float: y, Float: z, markertype, color, style)
playerid The ID of the player to set the map icon for.
iconid The player's icon ID, ranging from 0 to 99, to be used in RemovePlayerMapIcon.
Float: x The X coordinate of the place where you want the icon to be.
Float: y The Y coordinate of the place where you want the icon to be.
Float: z The Z coordinate of the place where you want the icon to be.
markertype The icon to set.
color The color of the icon, this should only be used with the square icon (ID: 1).
style See Below
Style
0: MAPICON_LOCAL Display in the player's local area
1: MAPICON_GLOBAL Display always
2: MAPICON_LOCAL_CHECKPOINT Display in the player's local area and has a checkpoint marker
3: MAPICON_GLOBAL_CHECKPOINT Display always and has a checkpoint marker
Note: If you use an invalid icon ID, it will create ID 1 (White Square)
Important Note: You can only have 100 mapicons!
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, MAPICON_LOCAL ); }