Place Map Icon On Top Of Pickup ???
#1

How do I place a map icon on top of a pickup so you can see where the pickup is when you look at the map. I cannot see how i would do it in this situation.

pawn Код:
if(strcmp(cmd, "/cash", true) == 0)
    {
        if (AccountInfo[playerid][AdminLevel] >= 5 || IsPlayerAdmin(playerid))
        {
        new StartPlayer[MAX_PLAYER_NAME];
        new Float: MoneySpawns[][3] =
        {
    {-1592.6356,-2659.0088,58.4613}, // RNDCASH SF CNTY GAS
        {-2083.7905,-2338.6848,30.6250}, // RNDCASH SF CNTY ANGPINE
        {-2805.8755,-1508.7063,139.2891}, // RNDCASH SF CNTY CHILHUT
        {-2530.9316,-612.8710,132.5625}, // RNDCASH SF CNTY RADIOTWR
        {-380.1267,-1437.8719,25.7266}, // RNDCASH SF CNTY FARMCOTG
        {-1931.9697,262.1848,41.0391}, // RNDCASH SF WANGCAR
        {-1806.2214,524.9689,234.8911}, // RNDCASH SF TOPOFFICE
        {-2132.4158,164.8731,42.25001}, // RNDCASH SF CONSTSITE
        {-2296.2561,726.3412,49.4304}, // RNDCASH SF CHINATALLEY
        {-2659.4683,1529.5741,54.9030}, // RNDCASH SF REDBRIDGE
        {-2373.8477,2216.6597,4.9844}, // RNDCASH LV BONE BOATLITHSE
        {-1953.6313,2371.6970,49.4922}, // RNDCASH LV BONE CAFE
        {-1461.8723,2643.4072,55.8359}, // RNDCASH LV BONE ELQUEBRADOS
        {-655.7908,2620.7319,147.0586}, // RNDCASH LV BONE TOPOCLIFF
        {262.7540,1809.4485,33.8984}, // RNDCASH LV BONE AREA51
        {611.8745,1233.9475,11.7188}, // RNDCASH LV BONE OILREFINERY
        {1340.7020,2003.0966,10.8127}, // RNDCASH LV RNDALLEY
        {1656.1444,2378.8967,18.92974}, // RNDCASH LV FACTRYCONTNRS
        {1964.7794,1919.0649,130.9375}, // RNDCASH LV TOPVISAGE HTL
        {2623.5811,2343.8789,10.8203}, // RNDCASH LV VROK HTL
        {2859.7354,1277.1532,11.3906}, // RNDCASH LV TRAINSTN
        {687.9995,-442.7308,16.3359},// RNDCASH LS CNTY DILIMORE
        {-176.4093,16.6944,3.1094},// RNDCASH LS CNTY FRMFEILD
        {1476.0381,359.9031,19.2604},// RNDCASH LS CNTY CARAPRK
        {2359.8035,-654.4086,128.0970}, // RNDCASH LS CNTY RNDMHUT
        {2484.0085,-1543.3998,24.0120}, // RNDCASH LS NEARCLKBELL
        {2810.0349,-2564.4558,13.6328}, // RNDCASH LS DOCKS
        {2129.5830,-2279.5068,20.6643}, // RNDCASH LS FACTORYROOM
        {1126.6320,-2036.8907,69.8837} // RNDCASH LS VERDBLUFFS
        };
        new RandCashSpawn = random(sizeof(MoneySpawns));
        //new CashIcon;
        //new CashLoc;
        GetPlayerName(playerid, StartPlayer, sizeof(StartPlayer));
        RandomCashBag = AddStaticPickup(1550,3,MoneySpawns[RandCashSpawn][0],MoneySpawns[RandCashSpawn][1],MoneySpawns[RandCashSpawn][2]);
        SendClientMessageToAll(ADMIN_RED, "A Bag Containing $50000 Has Just Spawned! The First One To Find The Bag Gets The Cash! ( $ Icon )");
    }
    return 1;
}
Reply
#2

max map icons are 32
Reply
#3

Yes i know but I only have 1
Reply
#4

Any Ideas...?
Reply
#5

if(MapIconsShown[playerid] != 1)
{
MapIconsShown[playerid] = 1;
}
return 1;
}


SetPlayerMapIcon(playerid, 1, X,Y,Z, ICONID, COLOR_YELLOW);
Reply
#6

Quote:
Originally Posted by Linxx87
if(MapIconsShown[playerid] != 1)
{
MapIconsShown[playerid] = 1;
}
return 1;
}


SetPlayerMapIcon(playerid, 1, X,Y,Z, ICONID, COLOR_YELLOW);
Ha?
Reply
#7

The only problem is the X Y Z co-ordinates are always going to be deiffernet every time so how do I make sure the icon will show on the random pickup spawn.
Reply
#8

http://pawn.pastebin.com/m4b6609c3

That should work, if not, edit it a bit.
Reply
#9

Ok that code worked but the icon will not show up on the map or radar. Do you have to be close to the the pickup for it to show up on the map / radar?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)