[0.3c] [R3] MapIcons
#1

We use mapicons to show on radar where the race leader is. The problem is that it doesn't replace/remove the previous mapicon.
Код:
	RemovePlayerMapIcon(playerid, 0);
	SetPlayerMapIcon(playerid, 0, GRID_Stored[0][0] ,GRID_Stored[0][1], GRID_Stored[0][2], 33, 0, MAPICON_GLOBAL);
	RemovePlayerMapIcon(playerid, 2);
	SetPlayerMapIcon(playerid, 2, RaceCheckpoints[RACE_Max_Checkpoints -1][0],RaceCheckpoints[RACE_Max_Checkpoints -1][1],RaceCheckpoints[RACE_Max_Checkpoints -1][2], 55, 0, MAPICON_LOCAL);
So you end up with hundreds of mapicons, as show below:


Can anyone help?
Reply
#2

-deleted-

Oh, my bad, SetPlayerMapIcon doesn't return icon ID.
Reply
#3

There seems to be a bug with deleting MAPICON_LOCAL_CHECKPOINT. Are you sure you weren't using that one?
Reply
#4

Код:
#if defined SAMP_VERSION
//			RemovePlayerMapIcon(playerid, 1);
//			SetPlayerMapIcon(i, 1, TelevisionAX[0], TelevisionAX[1], TelevisionAX[2], 55, 0, MAPICON_LOCAL_CHECKPOINT);
#else
			SetPlayerMapIcon(i, 1, TelevisionAX[0], TelevisionAX[1], TelevisionAX[2], 55, 0);
#endif
Yes Kye, you're right about the car icons.
On the picture though, the cups are repeated, there should only be a max of 2. I see at least 4.

EDIT: Yes, MAPICON_LOCAL_CHECKPOINT appears to be the problem. Thanks.
Reply
#5

I suggest not using MAPICON_LOCAL_CHECKPOINT until the next RC (anything after 0.3c RC3) as there is a bug with that style.
Reply
#6

Ok.

Just one other thing, I have heard it was planned, but why are the checkpoints on the radar now pink?
Reply
#7

It's just a slightly different shade of red. I didn't think anyone would care/notice. It'll be changed back in the next RC.
Reply
#8

Thanks for the explanations.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)