SA-MP Forums Archive
[0.3c] [R3] MapIcons - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [0.3c] [R3] MapIcons (/showthread.php?tid=196397)



[0.3c] [R3] MapIcons - Rac3r - 05.12.2010

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?


Re: [0.3c] [R3] MapIcons - gimini - 05.12.2010

-deleted-

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


Re: [0.3c] [R3] MapIcons - Kalcor - 05.12.2010

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


Re: [0.3c] [R3] MapIcons - Rac3r - 05.12.2010

Код:
#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.


Re: [0.3c] [R3] MapIcons - Kalcor - 05.12.2010

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


Re: [0.3c] [R3] MapIcons - Rac3r - 05.12.2010

Ok.

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


Re: [0.3c] [R3] MapIcons - Kalcor - 05.12.2010

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.


Re: [0.3c] [R3] MapIcons - Rac3r - 05.12.2010

Thanks for the explanations.