If you want to hide a specific player on the map, you can set the alpha value to 0x00. If you want to make him visible again, you just have to set it to 0xFF.
Since this is not always simple, to store the current color of the player in a invisible and a visible way, you can use bitwise or to do that task for you.
This is my togglePlayerMapIconVisibility function, which keeps the color of the player and toggles the player to visible or invisible on the map.
stock togglePlayerMapIconVisibility(playerid,bool:visible){
SetPlayerColor(playerid, (GetPlayerColor(playerid) | 0xFF) - (visible ? 0x00 : 0xFF));
}