[HELP]Mini map Icons scripting.
#1

Код:
public OnPlayerConnect(playerid)
{
    SetPlayerMapIcon(playerid, 1, 2136.19, -1147.62, 24.52, 55, 0 );
 SetPlayerMapIcon(playerid, 1, 1553.53, -1675.70, 16.20, 30, 0 );
 SetPlayerMapIcon(playerid, 1, 1315.42, -897.68, 39.58, 17, 0 );
 SetPlayerMapIcon(playerid, 1, 1380.79, -1088.64, 27.38, 56, 0 );
 SetPlayerMapIcon(playerid, 1, 1368.45, -1279.75, 13.55 , 6, 0 );
 SetPlayerMapIcon(playerid, 1, 2033.69, -1403.43, 17.28, 22, 0 );
 SetPlayerMapIcon(playerid, 1, 2166.59, -1671.94, 15.07, 24, 0 );
 SetPlayerMapIcon(playerid, 1, 2229.89, -1721.26, 13.56, 54, 0 );
 SetPlayerMapIcon(playerid, 1, 2501.88, -1753.83, 13.42, 55, 0 );
 SetPlayerMapIcon(playerid, 1, 2245.09, 1664.62, 15.62, 45, 0 );
 SetPlayerMapIcon(playerid, 1, 1836.93, -1682.41, 13.33, 49, 0 );
 SetPlayerMapIcon(playerid, 1, 1833.69, -1842.58, 13.58, 17, 0 );
 SetPlayerMapIcon(playerid, 1, 1741.44, -1863.67, 13.57, 56, 0 );
 SetPlayerMapIcon(playerid, 1, 1180.37, -1330.23, 14.19, 22, 0 );
 SetPlayerMapIcon(playerid, 1, 2351.57, -1168.01, 27.83, 16, 0 );
 SetPlayerMapIcon(playerid, 1, 2231.88, -1333.47, 23.98, 12, 0 );
 SetPlayerMapIcon(playerid, 1, 1798.18, -1578.37, 14.09, 60, 0 );
 SetPlayerMapIcon(playerid, 1, 646.50, -1359.25, 13.09, 35, 0 );
 SetPlayerMapIcon(playerid, 1, 547.53, -1275.46, 16.76, 55, 0 );
 SetPlayerMapIcon(playerid, 1, 1060.51, -918.00, 42.93, 55, 0 );
 SetPlayerMapIcon(playerid, 1, 1463.79, -1013.14, 26.84, 52, 0 );
 SetPlayerMapIcon(playerid, 1, 1459.61, -1139.73, 23.77, 45, 0 );
 SetPlayerMapIcon(playerid, 1, 387.34, -1897.08, 7.84, 17, 0 );
 SetPlayerMapIcon(playerid, 1, 386.17, -2078.86, 7.84, 9, 0 );
 SetPlayerMapIcon(playerid, 1, 1352.33, -1759.25, 13.51, 17, 0 );
 SetPlayerMapIcon(playerid, 1, 1656.88, -1895.69, 13.26, 55, 0 );
 SetPlayerMapIcon(playerid, 1, 2195.84, -1972.99, 13.56, 56, 0 );
 SetPlayerMapIcon(playerid, 1, 1554.01, -2175.75, 13.25, 20, 0 );
 SetPlayerMapIcon(playerid, 1, 325.05, -1898.81, 0.95, 9, 0 );
 SetPlayerMapIcon(playerid, 1, -2711.25, 217.37, 3.92, 27, 0 );
}
For some reason, when I put it in the script, It does not show up on the minimap. If someone can help? Thank you.
Reply
#2

You are using the same id for each map icon! That's your problem, it's constantly re-creating that map icon with the specified ID. Please look at documentation of the function here: https://sampwiki.blast.hk/wiki/SetPlayerMapIcon

It should look something more like so:
pawn Код:
SetPlayerMapIcon(playerid, 1, 2136.19, -1147.62, 24.52, 55, 0 );
SetPlayerMapIcon(playerid, 2, 1553.53, -1675.70, 16.20, 30, 0 );
SetPlayerMapIcon(playerid, 3, 1315.42, -897.68, 39.58, 17, 0 );
SetPlayerMapIcon(playerid, 4, 1380.79, -1088.64, 27.38, 56, 0 );
SetPlayerMapIcon(playerid, 5, 1368.45, -1279.75, 13.55 , 6, 0 );
...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)