SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 21/03/2009, 09:05 PM   #1
Alec24
Big Clucker
 
Join Date: Feb 2009
Posts: 147
Reputation: 0
Default 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;
}
Alec24 is offline  
Old 21/03/2009, 09:23 PM   #2
d0
Beta Tester
 
d0's Avatar
 
Join Date: Oct 2007
Location: Germany
Posts: 434
Reputation: 135
Default Re: Place Map Icon On Top Of Pickup ???

max map icons are 32
__________________
<3
d0 is offline  
Old 21/03/2009, 09:29 PM   #3
Alec24
Big Clucker
 
Join Date: Feb 2009
Posts: 147
Reputation: 0
Default Re: Place Map Icon On Top Of Pickup ???

Yes i know but I only have 1
Alec24 is offline  
Old 23/03/2009, 06:42 PM   #4
Alec24
Big Clucker
 
Join Date: Feb 2009
Posts: 147
Reputation: 0
Default Re: Place Map Icon On Top Of Pickup ???

Any Ideas...?
Alec24 is offline  
Old 23/03/2009, 06:53 PM   #5
Linxx87
Little Clucker
 
Join Date: Jun 2008
Posts: 36
Reputation: 0
Default 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);
Linxx87 is offline  
Old 23/03/2009, 06:58 PM   #6
Dujma
Huge Clucker
 
Join Date: Jul 2008
Posts: 415
Reputation: 0
Default 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?
Dujma is offline  
Old 23/03/2009, 07:10 PM   #7
Alec24
Big Clucker
 
Join Date: Feb 2009
Posts: 147
Reputation: 0
Default 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.
Alec24 is offline  
Old 23/03/2009, 07:14 PM   #8
tom_jonez
Huge Clucker
 
Join Date: Dec 2007
Posts: 219
Reputation: 0
Default Re: Place Map Icon On Top Of Pickup ???

http://pawn.pastebin.com/m4b6609c3

That should work, if not, edit it a bit.
tom_jonez is offline  
Old 23/03/2009, 07:59 PM   #9
Alec24
Big Clucker
 
Join Date: Feb 2009
Posts: 147
Reputation: 0
Default 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?
Alec24 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkpoint icon overlaying map icon? iron_war_lord Help Archive 3 01/03/2010 03:02 PM
about time and pickup icon. arachimi Help Archive 5 12/12/2009 06:48 PM
there is no pickup icon Medzmara Help Archive 3 24/10/2009 10:07 AM
[HELP] How can I get a pickup icon ingame? FreddeN Help Archive 6 05/06/2009 11:41 PM
Unknown Pickup Icon? ReV. Help Archive 3 20/03/2009 11:29 PM


All times are GMT. The time now is 08:52 PM.


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