PDA

View Full Version : Map Icons


Qur
21/11/2011, 09:55 AM
hey.. this is part of my: OnPlayerConnect



public OnPlayerConnect(playerid)
{
SetPlayerMapIcon( playerid, 1, 1628.6899,-1903.3833,13.5533, 55, 0, MAPICON_LOCAL ); // DMV
SetPlayerMapIcon( playerid, 2, 1154.1097,-1772.0492,16.5992, 20, 0, MAPICON_LOCAL ); // LSFD
SetPlayerMapIcon( playerid, 3, 1181.9185,-1324.9333,13.5828, 22, 0, MAPICON_LOCAL ); // LSMD
SetPlayerMapIcon( playerid, 4, 1948.9819,-1985.1008,13.5469, 49, 0, MAPICON_LOCAL ); // Vatos Locos Mexicanos
SetPlayerMapIcon( playerid, 5, 2421.4934,-1219.2512,25.5613, 48, 0, MAPICON_LOCAL ); // Le Sangre Pig Pen
SetPlayerMapIcon( playerid, 6, 998.8512,-1130.9669,23.8281, 44, 0, MAPICON_LOCAL ); // Triads Casino
SetPlayerMapIcon( playerid, 7, 574.9641,-1385.9547,14.3303, 50, 0, MAPICON_LOCAL ); // Santino's Restaurant


well.. it doesnt work for some raseon...
anyone knows what's wrong?
thanks

Wesley221
21/11/2011, 10:18 AM
0: MAPICON_LOCAL Display in the player's local area
1: MAPICON_GLOBAL Display always // <-- you need this one
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

You should use MAPICON_GLOBAL to see it everywhere

Qur
21/11/2011, 10:24 AM
Man.. I'm not stupid to that level...
When I'm next to it I dont see it! I dont need it global........

Babul
21/11/2011, 11:24 AM
maybe it works if you put it in OnPlayerSpawn?

=WoR=G4M3Ov3r
21/11/2011, 11:35 AM
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon( playerid, 1, 1628.6899,-1903.3833,13.5533, 55, 0 ); // DMV
SetPlayerMapIcon( playerid, 2, 1154.1097,-1772.0492,16.5992, 20, 0 ); // LSFD
SetPlayerMapIcon( playerid, 3, 1181.9185,-1324.9333,13.5828, 22, 0 ); // LSMD
SetPlayerMapIcon( playerid, 4, 1948.9819,-1985.1008,13.5469, 49, 0 ); // Vatos Locos Mexicanos
SetPlayerMapIcon( playerid, 5, 2421.4934,-1219.2512,25.5613, 48, 0 ); // Le Sangre Pig Pen
SetPlayerMapIcon( playerid, 6, 998.8512,-1130.9669,23.8281, 44, 0 ); // Triads Casino
SetPlayerMapIcon( playerid, 7, 574.9641,-1385.9547,14.3303, 50, 0 ); // Santino's Restaurant

There is absolutely no need to use the last parameter in the SetPlayerMapIcon native.

SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style)

Qur
21/11/2011, 11:44 AM
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon( playerid, 1, 1628.6899,-1903.3833,13.5533, 55, 0 ); // DMV
SetPlayerMapIcon( playerid, 2, 1154.1097,-1772.0492,16.5992, 20, 0 ); // LSFD
SetPlayerMapIcon( playerid, 3, 1181.9185,-1324.9333,13.5828, 22, 0 ); // LSMD
SetPlayerMapIcon( playerid, 4, 1948.9819,-1985.1008,13.5469, 49, 0 ); // Vatos Locos Mexicanos
SetPlayerMapIcon( playerid, 5, 2421.4934,-1219.2512,25.5613, 48, 0 ); // Le Sangre Pig Pen
SetPlayerMapIcon( playerid, 6, 998.8512,-1130.9669,23.8281, 44, 0 ); // Triads Casino
SetPlayerMapIcon( playerid, 7, 574.9641,-1385.9547,14.3303, 50, 0 ); // Santino's Restaurant

There is absolutely no need to use the last parameter in the SetPlayerMapIcon native.

SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style)


Not working

=WoR=G4M3Ov3r
21/11/2011, 11:48 AM
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon( playerid, 0, 1628.6899,-1903.3833,13.5533, 55, 0 ); // DMV
SetPlayerMapIcon( playerid, 1, 1154.1097,-1772.0492,16.5992, 20, 0 ); // LSFD
SetPlayerMapIcon( playerid, 2, 1181.9185,-1324.9333,13.5828, 22, 0 ); // LSMD
SetPlayerMapIcon( playerid, 3, 1948.9819,-1985.1008,13.5469, 49, 0 ); // Vatos Locos Mexicanos
SetPlayerMapIcon( playerid, 4, 2421.4934,-1219.2512,25.5613, 48, 0 ); // Le Sangre Pig Pen
SetPlayerMapIcon( playerid, 5, 998.8512,-1130.9669,23.8281, 44, 0 ); // Triads Casino
SetPlayerMapIcon( playerid, 6, 574.9641,-1385.9547,14.3303, 50, 0 ); // Santino's Restaurant

You must start with 0, not 1.

And I didn't see that aswell :p, now it should work.

Qur
21/11/2011, 01:09 PM
Okay thanks.. but already made it work by using OnPlayerSpawn :)