////////////////////////////////////// /// Icon Control /// /// /// /// /// /// /// /// Copyright by Rafelder /// ////////////////////////////////////// #define MAX_ICONS 1000 #define MAX_SHOWED_MAPICONS 32 //Don't write more than 32! new Float:XM[MAX_ICONS]; new Float:YM[MAX_ICONS]; new Float:ZM[MAX_ICONS]; new MarkerM[MAX_ICONS]; new ColorM[MAX_ICONS]; new IsValid[MAX_ICONS]; new Show[MAX_PLAYERS][MAX_ICONS]; new IconidM=-1; new Set_Timer=0; new Count=0; new ShowedForPlayer[MAX_PLAYERS]; forward StreamTimer(); /* native CreateMapIcon(markerid, color, Float:X, Float:Y, Float:Z); native DestroyMapIcon(iconid); native ResetMapIconVariables(playerid); native IsValidMapIcon(iconid); native IsIconActivatedForPlayer(playerid, iconid); native IsIconActivatedForAll(iconid); native SetMapIconPos(iconid, Float:X, Float:Y, Float:Z); native SetMapIconIcon(iconid, markerid, color); native SetMapIconColor(iconid, color); native GetMapIconPos(iconid, &Float:X, &Float:Y, &Float:Z); native GetMapIconIcon(iconid); native GetMapIconColor(iconid); native ShowMapIconForPlayer(playerid, iconid); native ShowMapIconForAll(iconid); native ShowAllMapIconForPlayer(playerid); native ShowAllMapIconForAll(); native DisableMapIconForPlayer(playerid, iconid); native DisableMapIconForAll(iconid); native DisableAllMapIconForPlayer(playerid); native DisableAllMapIconForAll(); */ /***************************CREATE***************************/ stock CreateMapIcon(markerid, color, Float:X, Float:Y, Float:Z) { if (Set_Timer == 0) { SetTimer("StreamTimer", 200, 1); Set_Timer=1; } if (IconidM >= MAX_ICONS) return 0; IconidM++; IsValid[IconidM]=1; XM[IconidM]=X; YM[IconidM]=Y; ZM[IconidM]=Z; MarkerM[IconidM]=markerid; ColorM[IconidM]=color; for(new i=0; i