03.10.2014, 17:47
I have some problems about mapicons. I want to change distance of icons. Player would see all icons that minimap shows but I have a very complicated code. Could you help me?
Additionaly I want these icons that are seen on minimap appears on general map like that:
Код:
#define INVALID_ICON_ID -1 new Slot[MAX_PLAYERS][MAX_CHECKPOINTS]; new SlotUsed[MAX_PLAYERS][32]; new IconCount[MAX_PLAYERS]; forward MapIconUpdate(); public MapIconUpdate() { new s;//new string[256]; //new Float:X,Float:Y,Float:Z; for(new i; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i) && PlayerInfo[i][pSpawn] == 1) { for(new j = 0; j < sizeof(HouseInfo); j++)//sizeof(HouseInfo) Current_House_ID { if (HouseData[j][h_RobWaitTime] > 0) { HouseData[j][h_RobWaitTime] --; } if (HouseData[j][h_InviteTime] > 0) { HouseData[j][h_InviteTime] --; if (HouseData[j][h_InviteTime] == 1) { HouseData[j][h_InviteID] = -1; HouseData[j][h_InviteRequestID] = -1; } } if (j > 0 && HouseInfo[j][h_cpmarker] > 0) { if (IsPlayerInRangeOfPoint(i, 100.0, HouseInfo[j][h_cpx], HouseInfo[j][h_cpy], HouseInfo[j][h_cpz]) && GetPlayerVirtualWorld(i) == 0) { if(Slot[i][j] == INVALID_ICON_ID) { s = GetFreeSlot(i); if(IconCount[i] < 99 && s != INVALID_ICON_ID) { if (HouseData[j][h_OwnerID] > -1 && HouseInfo[j][h_cptype] == CP_TYPE_HOUSE) { if (HouseData[j][h_OwnerID] == i) { HouseInfo[j][h_cpmarker] = 35; }else{ if (HouseData[j][h_Rent] > 0) { HouseInfo[j][h_cpmarker] = 32; } } } SetPlayerMapIcon(i,s,HouseInfo[j][h_cpx], HouseInfo[j][h_cpy], HouseInfo[j][h_cpz],HouseInfo[j][h_cpmarker],0, MAPICON_GLOBAL); SlotUsed[i][s]=true; Slot[i][j] = s; IconCount[i] ++; } } }else{ if(Slot[i][j] != INVALID_ICON_ID) { RemovePlayerMapIcon(i,Slot[i][j]); SlotUsed[i][Slot[i][j]] = false; Slot[i][j] = INVALID_ICON_ID; IconCount[i]--; } } } } } } return 1; }
![](http://i.hizliresim.com/XY0kZk.png)