dracoblue.net

Toggle Map-Icon Visibility for a Player

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));
}
In pawn by
@ 03 Jun 2009, Comments at Reddit & Hackernews

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files

About