SA-MP Forums Archive
How to hide health/armour bars to players? - 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: How to hide health/armour bars to players? (/showthread.php?tid=589987)



How to hide health/armour bars to players? - warriorfrog - 24.09.2015

I want stop this hac'k:

https://www.youtube.com/watch?v=-vWDVDcA1kA

My script is working (on name tag), but if u use this ceat u can see health / armour bar to distances players... How to fix it?

My script:
Код:
#define MAX_DISTANCIA 30.0

// Gamemode init
SetTimer("AntiNameTag",500,true);


forward AntiNameTag();
public AntiNameTag()
{
    foreach(Player,playerid)
    {
        foreach(Player,i)
        {
            if(i == playerid)    continue;
            if(GetPlayerDistanceFromPlayer(playerid, i) <= MAX_DISTANCIA)
            {
                ShowPlayerNameTagForPlayer(playerid,i,true);
            }
            else
            {
                ShowPlayerNameTagForPlayer(playerid,i,false);
            }
        }
    }
}
Float:GetPlayerDistanceFromPlayer(playerid, targetid)
{
    new Float:Pos[3];
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    return GetPlayerDistanceFromPoint(targetid, Pos[0], Pos[1], Pos[2]);
}



Re: How to hide health/armour bars to players? - pedrotvr - 25.09.2015

u need a function to hide/show health and armour bars for player


Re: How to hide health/armour bars to players? - warriorfrog - 25.09.2015

yeah i ask for it


Re: How to hide health/armour bars to players? - Aly - 25.09.2015

Код:
ShowPlayerNameTagForPlayer(playerid, showplayerid, show)
Link here: ShowPlayerNameTagForPlayer


Re: How to hide health/armour bars to players? - maikons - 26.09.2015

Quote:
Originally Posted by Aly
Посмотреть сообщение
Код:
ShowPlayerNameTagForPlayer(playerid, showplayerid, show)
Link here: ShowPlayerNameTagForPlayer
Did u see him code bro?


Re: How to hide health/armour bars to players? - warriorfrog - 27.09.2015

any know?


Re: How to hide health/armour bars to players? - warriorfrog - 29.09.2015

Don't have a function to show the bars (health/armour)?
Like this function to name's