Issues with map icons
#1

Hello
We've been facing some issues deploying map icons,for some reason some of them won't show until you go near them,some others show in the map (pause menu) without having to approach them ,they're all type (2) so there should be no problem with the type we have a total of 9 map icons so far and each time we restart a random amount of those 9 show (sometimes 7,3,4... random),here's the code

Код:
public OnPlayerSpawn(playerid)
{
  new text[20];
  format(text, sizeof(text), "ID: %d - Created? %d", 1, SetPlayerMapIcon(playerid, 1, 1124.27, -2037.1, 69.885, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 2, SetPlayerMapIcon(playerid, 2, 652.161, -1619.98, 15, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 3, SetPlayerMapIcon(playerid, 3, 1298.48, -800.456, 84.141, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 4, SetPlayerMapIcon(playerid, 4, 776.747, -1038.25, 24.262, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 5, SetPlayerMapIcon(playerid, 5, 1279.71, -1509.57, 10.047, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 6, SetPlayerMapIcon(playerid, 6, 2793.89, -1087.3, 30.719, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 7, SetPlayerMapIcon(playerid, 7, 2440, -1338.87, 24.102, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 8, SetPlayerMapIcon(playerid, 8, 2072.57, -1558.86, 13.41, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  format(text, sizeof(text), "ID: %d - Created? %d", 9, SetPlayerMapIcon(playerid, 9, 2296.73, -1882.92, 14.234, 31, 0, 2));
  SendClientMessage(playerid, 0xFFFFFFFF, text);
  return 1;
}
This is just a quick code we made out of the Gamemode,we've unloaded all plugins and filterscripts thinking it was some sort of conflict but still no use,it got to the point where we started thinking it was a SA-MP bug,would really appreciate any sort of help/ideas
Regards
Reply
#2

Read this: https://sampwiki.blast.hk/wiki/MapIconStyle
Reply
#3

Quote:
Originally Posted by KeithCooper
Посмотреть сообщение
As i stated above,I've already checked and applied that,nothing's fixed
Reply
#4

Try
Код:
	new text[20];
  	format(text, sizeof(text), "ID: %d - Created? %d", 1, SetPlayerMapIcon(playerid, 1, 1124.27, -2037.1, 69.885, 31, 0, 1));
  	SendClientMessage(playerid, 0xFFFFFFFF, text);
Quote:

SetPlayerMapIcon(playerid, iconid, Float, Float:y, Float:z, markertype, color, style);

In your code, you used 2 in 'style' argument, which means the map icon will displays in the player's local area. (with checkpoint in it)
https://sampwiki.blast.hk/wiki/MapIconStyle
Reply
#5

Quote:
Originally Posted by X337
Посмотреть сообщение
Try
Код:
	new text[20];
  	format(text, sizeof(text), "ID: %d - Created? %d", 1, SetPlayerMapIcon(playerid, 1, 1124.27, -2037.1, 69.885, 31, 0, 1));
  	SendClientMessage(playerid, 0xFFFFFFFF, text);

In your code, you used 2 in 'style' argument, which means the map icon will displays in the player's local area. (with checkpoint in it)
https://sampwiki.blast.hk/wiki/MapIconStyle
Hi

it's really not the icon type ,I've tried them all
Reply
#6

I don't understand the problem... are you saying you want them to always show on your map?

If so, then you're using the wrong map icon style...
https://sampwiki.blast.hk/wiki/MapIconStyle

0 MAPICON_LOCAL No Close proximity only
1 MAPICON_GLOBAL No Show on radar edge as long as in range

Not sure if you want a checkpoint in it or not, but local map icons will only show in close proximity, and global map icons will always be displayed when you're within range. Remember, you can only have up to 100 map icons at a time..
Reply
#7

Quote:
Originally Posted by Threshold
Посмотреть сообщение
I don't understand the problem... are you saying you want them to always show on your map?

If so, then you're using the wrong map icon style...
https://sampwiki.blast.hk/wiki/MapIconStyle

0 MAPICON_LOCAL No Close proximity only
1 MAPICON_GLOBAL No Show on radar edge as long as in range

Not sure if you want a checkpoint in it or not, but local map icons will only show in close proximity, and global map icons will always be displayed when you're within range. Remember, you can only have up to 100 map icons at a time..
Nope,that's not the problem sir,they're all local meaning they only show for close players in-game,and it shows for all in pause menu (map),problem is some icons won't show up until i go near them then they get shown,so again i got a total of 9 icons,sometimes only 4 appears sometimes 2... not sure why
Reply
#8

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)