local tInvisible = { }
local tSkins =
{
[ 217 ] = true;
[ 310 ] = true;
}
function fInvisible ( )
setTimer (
function ( uPlayer )
local nSkin = getElementModel ( uPlayer )
if tSkins[ nSkin ] then
tInvisible[ uPlayer ] = not tInvisible[ uPlayer ]
setPlayerNametagShowing ( uPlayer, not tInvisible[ uPlayer ] )
setElementAlpha ( uPlayer, not tInvisible[ uPlayer ] and 255 or 0 )
for _,uBlip in pairs( getAttachedElements( uPlayer ) ) do
if getElementType( uBlip ) == "blip" then
local nR, nG, nB, _ = getBlipColor( uBlip )
setBlipColor( uBlip, nR, nG, nB, not tInvisible[ uPlayer ] and 255 or 0 )
end
end
end
end
,200, 1, source )
end
addEventHandler ( "onPlayerSpawn", root, fInvisible )