SA-MP Forums Archive
Cant make an player invisible in map - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Cant make an player invisible in map (/showthread.php?tid=651765)



Cant make an player invisible in map - Jokers98s - 27.03.2018

On spawn the player is invisible when come close the player visible in map its static..here is the code

Код:
if(pClass{playerid} == CLASS_SNIPER)
    {
        SetPlayerColor(playerid, GetPlayerColor(playerid) & ~0xFF);
        foreach(new i : Player)
        {
            SetPlayerMarkerForPlayer( i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
        }
    }



Re: Cant make an player invisible in map - ForCop - 27.03.2018

Quote:
Originally Posted by Jokers98s
Посмотреть сообщение
On spawn the player is invisible when come close the player visible in map its static..here is the code

Код:
if(pClass{playerid} == CLASS_SNIPER)
    {
        SetPlayerColor(playerid, GetPlayerColor(playerid) & ~0xFF);
        foreach(new i : Player)
        {
            SetPlayerMarkerForPlayer( i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
        }
    }
Код:
if(pClass{playerid} == CLASS_SNIPER)
    {
        SetPlayerMarkerVisibility(playerid, 0)
    }
    

SetPlayerMarkerVisibility(playerid, alpha = 0xFF)
{
	new oldcolor, newcolor;
	alpha = clamp(alpha, 0x00, 0xFF);
	oldcolor = GetPlayerColor(playerid);
	newcolor = (oldcolor & ~0xFF) | alpha;
	return SetPlayerColor(playerid, newcolor);
}



Re: Cant make an player invisible in map - Stev - 27.03.2018

Alternatively, you could use Vince's version.

http://forum.sa-mp.com/showpost.php?...postcount=4319