SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Help Archive (https://forum.sa-mp.com/forumdisplay.php?f=89)
-   -   Place Map Icon On Top Of Pickup ??? (https://forum.sa-mp.com/showthread.php?t=69966)

Alec24 21/03/2009 09:05 PM

Place Map Icon On Top Of Pickup ???
 
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 Code:
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;
}

d0 21/03/2009 09:23 PM

Re: Place Map Icon On Top Of Pickup ???
 
max map icons are 32 :|

Alec24 21/03/2009 09:29 PM

Re: Place Map Icon On Top Of Pickup ???
 
Yes i know but I only have 1

Alec24 23/03/2009 06:42 PM

Re: Place Map Icon On Top Of Pickup ???
 
Any Ideas...?

Linxx87 23/03/2009 06:53 PM

Re: Place Map Icon On Top Of Pickup ???
 
if(MapIconsShown[playerid] != 1)
{
MapIconsShown[playerid] = 1;
}
return 1;
}


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

Dujma 23/03/2009 06:58 PM

Re: Place Map Icon On Top Of Pickup ???
 
Quote:

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


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

Ha?

Alec24 23/03/2009 07:10 PM

Re: Place Map Icon On Top Of Pickup ???
 
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.

tom_jonez 23/03/2009 07:14 PM

Re: Place Map Icon On Top Of Pickup ???
 
http://pawn.pastebin.com/m4b6609c3

That should work, if not, edit it a bit.

Alec24 23/03/2009 07:59 PM

Re: Place Map Icon On Top Of Pickup ???
 
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?


All times are GMT. The time now is 10:57 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.