Need help with drawing icons on the map
#1

Hello people from the SA-MP forum,

I have a question about drawing icons on the minimap. My idea is when a player calls in an UAV Overwatch drone (radar), the players from the other team will show on the minimap as yellow dots for the other team.

The code I use to define the teams:

Код:
new faction[MAX_PLAYERS] = 0;
When a player join team 1, their faction will be 1, if they join team 2, their faction will be 2.
This is what I'm trying to use to make it only draw enemy players on the minimap and not friendlies.

The only problem that I am facing is that I don't really know how to get all the player id's from the enemy players and get their x,y and z to draw the icon on the map.

I currently wrote this but I don't know how to make it work the way I described above.

Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);	
SetPlayerMapIcon(playerid, 1, x, y, z, 56, 0, MAPICON_GLOBAL );
Of course, this only makes a dot on the map for the player himself. Not all the players on the enemy team that are currently connected.

Any help with be highly appreciated.
Reply


Messages In This Thread
Need help with drawing icons on the map [still need help] - by EpicDutchie - 14.04.2014, 16:54
Re: Need help with drawing icons on the map - by Jefff - 14.04.2014, 16:59
Re: Need help with drawing icons on the map - by EpicDutchie - 14.04.2014, 17:04
Re: Need help with drawing icons on the map - by EpicDutchie - 14.04.2014, 19:42
Re: Need help with drawing icons on the map - by Jefff - 14.04.2014, 20:30
Re: Need help with drawing icons on the map - by EpicDutchie - 15.04.2014, 06:39
Re: Need help with drawing icons on the map - by EpicDutchie - 15.04.2014, 15:05
Re: Need help with drawing icons on the map - by EpicDutchie - 16.04.2014, 08:28
Re: Need help with drawing icons on the map - by DobbysGamertag - 16.04.2014, 08:31
Re: Need help with drawing icons on the map - by EpicDutchie - 16.04.2014, 08:51

Forum Jump:


Users browsing this thread: 1 Guest(s)